Update to sagemath 6.8

This commit is contained in:
pcpa 2015-12-22 12:50:40 -02:00
parent b4699213da
commit 3aa9b0c734
32 changed files with 806 additions and 615 deletions

1
.gitignore vendored
View file

@ -8,3 +8,4 @@
/sage-6.3.tar.gz /sage-6.3.tar.gz
/sage-6.4.1.tar.gz /sage-6.4.1.tar.gz
/sage-6.5.tar.gz /sage-6.5.tar.gz
/sage-6.8.tar.gz

View file

@ -1,16 +1,17 @@
diff -up src/sage/sandpiles/sandpile.py.orig src/sage/sandpiles/sandpile.py diff -up src/sage/sandpiles/sandpile.py.orig src/sage/sandpiles/sandpile.py
--- src/sage/sandpiles/sandpile.py.orig 2014-11-18 15:24:27.192127311 -0200 --- src/sage/sandpiles/sandpile.py.orig 2015-10-11 17:41:27.067777358 -0300
+++ src/sage/sandpiles/sandpile.py 2014-11-18 15:24:38.049127454 -0200 +++ src/sage/sandpiles/sandpile.py 2015-10-11 17:41:57.909778539 -0300
@@ -23,8 +23,6 @@ packages. An alternative is to install @@ -347,9 +347,6 @@ from sage.rings.arith import falling_fac
following variable to the correct path. from sage.rings.all import Integer, PolynomialRing, QQ, ZZ, lcm
""" from sage.symbolic.all import I, pi
-# TODO: remove the following line once 4ti2 functions are removed
-path_to_zsolve = os.path.join(SAGE_LOCAL,'bin','zsolve') -path_to_zsolve = os.path.join(SAGE_LOCAL,'bin','zsolve')
- -
r""" class Sandpile(DiGraph):
Sage Sandpiles """
Class for Dhar's abelian sandpile model.
@@ -4096,7 +4094,7 @@ class SandpileDivisor(dict): @@ -5230,7 +5227,7 @@ class SandpileDivisor(dict):
sign_file.close() sign_file.close()
# compute # compute
try: try:

46
sagemath-arb.patch Normal file
View file

@ -0,0 +1,46 @@
diff -up src/sage/libs/arb/acb.pxd.orig src/sage/libs/arb/acb.pxd
--- src/sage/libs/arb/acb.pxd.orig 2015-11-03 18:52:50.311601612 -0200
+++ src/sage/libs/arb/acb.pxd 2015-11-03 18:52:55.730601820 -0200
@@ -1,6 +1,6 @@
from sage.libs.arb.arb cimport arb_t, arb_struct
-cdef extern from "acb.h":
+cdef extern from "arb/acb.h":
ctypedef struct acb_struct:
arb_struct real
arb_struct imag
diff -up src/sage/libs/arb/arb.pxd.orig src/sage/libs/arb/arb.pxd
--- src/sage/libs/arb/arb.pxd.orig 2015-11-03 18:53:11.959602441 -0200
+++ src/sage/libs/arb/arb.pxd 2015-11-03 18:53:20.641602774 -0200
@@ -3,7 +3,7 @@ from sage.libs.arb.mag cimport mag_t
from sage.libs.flint.types cimport fmpz_t, fmpq_t
from sage.libs.mpfr cimport mpfr_t
-cdef extern from "arb.h":
+cdef extern from "arb/arb.h":
ctypedef struct arb_struct:
pass
diff -up src/sage/libs/arb/arf.pxd.orig src/sage/libs/arb/arf.pxd
--- src/sage/libs/arb/arf.pxd.orig 2015-11-03 18:53:33.240603256 -0200
+++ src/sage/libs/arb/arf.pxd 2015-11-03 18:53:39.569603498 -0200
@@ -3,7 +3,7 @@ from sage.libs.gmp.types cimport mpz_t
from sage.libs.flint.types cimport fmpz_t
from sage.libs.mpfr cimport mpfr_t, mpfr_rnd_t
-cdef extern from "arf.h":
+cdef extern from "arb/arf.h":
ctypedef struct arf_struct:
pass
ctypedef arf_struct arf_t[1]
diff -up src/sage/libs/arb/mag.pxd.orig src/sage/libs/arb/mag.pxd
--- src/sage/libs/arb/mag.pxd.orig 2015-11-03 18:52:18.254600385 -0200
+++ src/sage/libs/arb/mag.pxd 2015-11-03 18:52:31.009600873 -0200
@@ -1,6 +1,6 @@
from sage.libs.flint.types cimport fmpz_t, fmpq_t
-cdef extern from "mag.h":
+cdef extern from "arb/mag.h":
ctypedef struct mag_struct:
pass
ctypedef mag_struct mag_t[1]

View file

@ -1,12 +1,14 @@
diff -up src/module_list.py.orig src/module_list.py diff -up src/sage/numerical/backends/coin_backend.pyx.orig src/sage/numerical/backends/coin_backend.pyx
--- src/module_list.py.orig 2015-04-03 15:09:20.200406141 -0300 --- src/sage/numerical/backends/coin_backend.pyx.orig 2015-11-06 10:36:17.498631801 -0200
+++ src/module_list.py 2015-04-03 15:09:39.744406890 -0300 +++ src/sage/numerical/backends/coin_backend.pyx 2015-11-06 10:36:40.210632670 -0200
@@ -2187,7 +2187,7 @@ if (os.path.isfile(SAGE_INC + "/cplex.h" @@ -761,8 +761,8 @@ cdef class CoinBackend(GenericBackend):
libraries = ["stdc++", "cplex"]) model.setLogLevel(old_logLevel)
)
# multithreading
- import multiprocessing
- model.setNumberThreads(multiprocessing.cpu_count())
+ #import multiprocessing
+ #model.setNumberThreads(multiprocessing.cpu_count())
model.branchAndBound()
-if is_package_installed('cbc'):
+if 1:
ext_modules.append(
Extension("sage.numerical.backends.coin_backend",
["sage/numerical/backends/coin_backend.pyx"],

View file

@ -1,7 +1,7 @@
diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py
--- src/sage/databases/cremona.py.orig 2015-04-03 15:06:14.304399023 -0300 --- src/sage/databases/cremona.py.orig 2015-10-11 17:50:01.241797048 -0300
+++ src/sage/databases/cremona.py 2015-04-03 15:06:26.792399501 -0300 +++ src/sage/databases/cremona.py 2015-10-11 17:52:06.533801845 -0300
@@ -820,14 +820,9 @@ class MiniCremonaDatabase(SQLDatabase): @@ -827,14 +827,9 @@ class MiniCremonaDatabase(SQLDatabase):
if N < self.largest_conductor(): if N < self.largest_conductor():
message = "There is no elliptic curve with label " + label \ message = "There is no elliptic curve with label " + label \
+ " in the database" + " in the database"
@ -17,7 +17,7 @@ diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py
raise ValueError(message) raise ValueError(message)
ainvs = eval(c[0]) ainvs = eval(c[0])
data = {'cremona_label': label, data = {'cremona_label': label,
@@ -1670,10 +1665,12 @@ def CremonaDatabase(name=None,mini=None, @@ -1676,10 +1671,12 @@ def CremonaDatabase(name=None,mini=None,
if name is None and not set_global: if name is None and not set_global:
return _db return _db
if set_global and name is None: if set_global and name is None:
@ -34,53 +34,3 @@ diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py
if name == 'cremona': if name == 'cremona':
mini = False mini = False
elif name == 'cremona mini': elif name == 'cremona mini':
diff -up src/sage/libs/cremona/mat.pxd.orig src/sage/libs/cremona/mat.pxd
--- src/sage/libs/cremona/mat.pxd.orig 2015-02-16 17:15:10.000000000 -0700
+++ src/sage/libs/cremona/mat.pxd 2015-07-26 07:34:43.000000000 -0600
@@ -13,11 +13,13 @@ cdef extern from "eclib/homspace.h":
ctypedef struct mat "mat":
scalar* get_entries() # TODO: possibly not int --
scalar sub(long,long)
+ # These became methods from eclib-20150228:
+ long nrows()
+ long ncols()
+ long rank()
- long nrows(mat M)
- long ncols(mat M)
mat addscalar(mat M, scalar)
- long rank(mat M)
+
# Constructors
mat *new_mat "new mat" (mat m)
diff -up src/sage/libs/cremona/mat.pyx.orig src/sage/libs/cremona/mat.pyx
--- src/sage/libs/cremona/mat.pyx.orig 2015-02-16 17:15:10.000000000 -0700
+++ src/sage/libs/cremona/mat.pyx 2015-09-25 15:16:01.212387267 -0600
@@ -98,7 +98,7 @@ cdef class Matrix:
cdef long i, j
if self.M:
i, j = ij
- if 0<i and i<=nrows(self.M[0]) and 0<j and j<=ncols(self.M[0]):
+ if 0<i and i<=self.M[0].nrows() and 0<j and j<=self.M[0].ncols():
return self.M.sub(i,j)
raise IndexError, "matrix indices out of range"
raise IndexError, "cannot index into an undefined matrix"
@@ -115,7 +115,7 @@ cdef class Matrix:
sage: t.nrows()
2
"""
- return nrows(self.M[0])
+ return self.M[0].nrows()
def ncols(self):
"""
@@ -129,7 +129,7 @@ cdef class Matrix:
sage: M.dimension()
156
"""
- return ncols(self.M[0])
+ return self.M[0].ncols()
# Commented out since it gives very weird
# results when sign != 0.

View file

@ -1,12 +0,0 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2015-04-03 15:11:09.304410319 -0300
+++ src/module_list.py 2015-04-03 15:11:18.304410664 -0300
@@ -2196,7 +2196,7 @@ if 1:
)
-if is_package_installed('cryptominisat'):
+if 1:
ext_modules.extend([
Extension("sage.sat.solvers.cryptominisat.cryptominisat",
["sage/sat/solvers/cryptominisat/cryptominisat.pyx"],

View file

@ -1,13 +1,145 @@
diff -up src/module_list.py.orig src/module_list.py diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2015-04-03 14:55:11.184373629 -0300 --- src/module_list.py.orig 2015-11-02 18:12:21.186706786 -0200
+++ src/module_list.py 2015-04-03 14:55:20.536373988 -0300 +++ src/module_list.py 2015-11-02 18:12:48.252707822 -0200
@@ -2145,7 +2145,8 @@ ext_modules = [ @@ -116,7 +116,6 @@ library_order["stdc++"] = 1000
# These extensions are to be compiled only if the ###
# corresponding packages have been installed #############################################################
-from sage.misc.package import is_package_installed -from sage_setup.optional_extension import OptionalExtension
+def is_package_installed(name): UNAME = os.uname()
+ return False
if is_package_installed('fes'): def uname_specific(name, value, alternative):
ext_modules.extend([ @@ -338,21 +337,21 @@ ext_modules = [
libraries = ['flint'],
extra_compile_args = ['-std=c99']),
- OptionalExtension("sage.graphs.mcqd",
- ["sage/graphs/mcqd.pyx"],
- language = "c++",
- package = 'mcqd'),
-
- OptionalExtension("sage.graphs.bliss",
- ["sage/graphs/bliss.pyx"],
- language = "c++",
- libraries = ['bliss'],
- package = 'bliss'),
-
- OptionalExtension('sage.graphs.modular_decomposition',
- sources = ['sage/graphs/modular_decomposition.pyx'],
- libraries = ['modulardecomposition'],
- package = 'modular_decomposition'),
+# Extension("sage.graphs.mcqd",
+# ["sage/graphs/mcqd.pyx"],
+# language = "c++",
+# package = 'mcqd'),
+
+# Extension("sage.graphs.bliss",
+# ["sage/graphs/bliss.pyx"],
+# language = "c++",
+# libraries = ['bliss'],
+# package = 'bliss'),
+
+# Extension('sage.graphs.modular_decomposition',
+# sources = ['sage/graphs/modular_decomposition.pyx'],
+# libraries = ['modulardecomposition'],
+# package = 'modular_decomposition'),
Extension('sage.graphs.planarity',
sources = ['sage/graphs/planarity.pyx'],
@@ -504,19 +503,19 @@ ext_modules = [
##
################################
- OptionalExtension('sage.libs.coxeter3.coxeter',
- sources = ['sage/libs/coxeter3/coxeter.pyx'],
- include_dirs = [os.path.join(SAGE_INC, 'coxeter')],
- language="c++",
- libraries = ['coxeter3'],
- package = 'coxeter3'),
+# Extension('sage.libs.coxeter3.coxeter',
+# sources = ['sage/libs/coxeter3/coxeter.pyx'],
+# include_dirs = [os.path.join(SAGE_INC, 'coxeter')],
+# language="c++",
+# libraries = ['coxeter3'],
+# package = 'coxeter3'),
Extension('sage.libs.ecl',
sources = ["sage/libs/ecl.pyx"],
libraries = ["ecl"],
depends = [SAGE_INC + '/ecl/ecl.h']),
- OptionalExtension("sage.libs.fes",
+ Extension("sage.libs.fes",
["sage/libs/fes.pyx"],
language = "c",
libraries = ['fes'],
@@ -988,13 +987,6 @@ ext_modules = [
Extension('*', ['sage/misc/*.pyx']),
- # Only include darwin_utilities on OS_X >= 10.5
- OptionalExtension('sage.misc.darwin_utilities',
- sources = ['sage/misc/darwin_memory_usage.c',
- 'sage/misc/darwin_utilities.pyx'],
- depends = ['sage/misc/darwin_memory_usage.h'],
- condition = (UNAME[0] == "Darwin" and not UNAME[2].startswith('8.'))),
-
################################
##
## sage.modular
@@ -1122,19 +1114,7 @@ ext_modules = [
language = 'c++',
libraries=["gmp", "glpk", "z"]),
- OptionalExtension("sage.numerical.backends.gurobi_backend",
- ["sage/numerical/backends/gurobi_backend.pyx"],
- libraries = ["stdc++", "gurobi"],
- condition = os.path.isfile(SAGE_INC + "/gurobi_c.h") and
- os.path.isfile(SAGE_LOCAL + "/lib/libgurobi.so")),
-
- OptionalExtension("sage.numerical.backends.cplex_backend",
- ["sage/numerical/backends/cplex_backend.pyx"],
- libraries = ["stdc++", "cplex"],
- condition = os.path.isfile(SAGE_INC + "/cplex.h") and
- os.path.isfile(SAGE_LOCAL + "/lib/libcplex.a")),
-
- OptionalExtension("sage.numerical.backends.coin_backend",
+ Extension("sage.numerical.backends.coin_backend",
["sage/numerical/backends/coin_backend.pyx"],
language = 'c++',
libraries = ["Cbc", "CbcSolver", "Cgl", "Clp", "CoinUtils", "OsiCbc", "OsiClp", "Osi", "lapack"],
@@ -1234,7 +1214,7 @@ ext_modules = [
libraries=['ntl'],
language = 'c++'),
- OptionalExtension("sage.rings.complex_ball_acb",
+ Extension("sage.rings.complex_ball_acb",
["sage/rings/complex_ball_acb.pyx"],
libraries=['arb', 'mpfi', 'mpfr'],
include_dirs=[SAGE_INC + '/flint'],
@@ -1307,7 +1287,7 @@ ext_modules = [
Extension('sage.rings.real_interval_absolute',
sources = ['sage/rings/real_interval_absolute.pyx']),
- OptionalExtension("sage.rings.real_arb",
+ Extension("sage.rings.real_arb",
["sage/rings/real_arb.pyx"],
libraries = ['arb', 'mpfi', 'mpfr'],
include_dirs = [SAGE_INC + '/flint'],
@@ -1602,14 +1582,14 @@ ext_modules = [
##
################################
- OptionalExtension("sage.sat.solvers.cryptominisat.cryptominisat",
+ Extension("sage.sat.solvers.cryptominisat.cryptominisat",
sources = ["sage/sat/solvers/cryptominisat/cryptominisat.pyx"],
include_dirs = [os.path.join(SAGE_INC, "cmsat")],
language = "c++",
libraries = ['cryptominisat', 'z'],
package = 'cryptominisat'),
- OptionalExtension("sage.sat.solvers.cryptominisat.solverconf",
+ Extension("sage.sat.solvers.cryptominisat.solverconf",
sources = ["sage/sat/solvers/cryptominisat/solverconf.pyx", "sage/sat/solvers/cryptominisat/solverconf_helper.cpp"],
include_dirs = [os.path.join(SAGE_INC, "cmsat")],
language = "c++",

14
sagemath-fes-build.patch Normal file
View file

@ -0,0 +1,14 @@
diff -up src/sage/libs/fes.pyx.orig src/sage/libs/fes.pyx
--- src/sage/libs/fes.pyx.orig 2015-11-29 16:53:45.203478795 -0200
+++ src/sage/libs/fes.pyx 2015-11-29 16:54:23.318480255 -0200
@@ -89,8 +89,8 @@ from sage.rings.polynomial.pbori import
from sage.rings.arith import binomial
from sage.combinat.subset import Subsets
-from sage.matrix.all import *
-from sage.modules.all import *
+from sage.matrix.all import identity_matrix, matrix
+from sage.modules.all import vector

View file

@ -1,12 +1,20 @@
diff -up src/module_list.py.orig src/module_list.py diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2015-04-03 15:10:36.432409060 -0300 --- src/module_list.py.orig 2015-10-11 18:08:06.689838613 -0300
+++ src/module_list.py 2015-04-03 15:10:46.240409436 -0300 +++ src/module_list.py 2015-10-11 18:08:21.686839187 -0300
@@ -2149,7 +2149,7 @@ ext_modules = [ @@ -515,11 +515,11 @@ ext_modules = [
def is_package_installed(name): libraries = ["ecl"],
return False depends = [SAGE_INC + '/ecl/ecl.h']),
-if is_package_installed('fes'): - Extension("sage.libs.fes",
+if 1: - ["sage/libs/fes.pyx"],
ext_modules.extend([ - language = "c",
Extension("sage.libs.fes", - libraries = ['fes'],
["sage/libs/fes.pyx"], - package = 'fes'),
+# Extension("sage.libs.fes",
+# ["sage/libs/fes.pyx"],
+# language = "c",
+# libraries = ['fes'],
+# package = 'fes'),
Extension('sage.libs.flint.flint',
sources = ["sage/libs/flint/flint.pyx"],

View file

@ -1,7 +1,15 @@
diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/permgroup.py diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/permgroup.py
--- src/sage/groups/perm_gps/permgroup.py.orig 2015-04-03 15:08:05.769403291 -0300 --- src/sage/groups/perm_gps/permgroup.py.orig 2015-10-11 17:56:24.028811706 -0300
+++ src/sage/groups/perm_gps/permgroup.py 2015-04-03 15:08:15.296403656 -0300 +++ src/sage/groups/perm_gps/permgroup.py 2015-10-11 17:58:26.629816401 -0300
@@ -181,8 +181,7 @@ def hap_decorator(f): @@ -136,7 +136,6 @@ from sage.groups.perm_gps.permgroup_elem
from sage.groups.abelian_gps.abelian_group import AbelianGroup
from sage.misc.cachefunc import cached_method
from sage.groups.class_function import ClassFunction
-from sage.misc.package import is_package_installed
from sage.sets.finite_enumerated_set import FiniteEnumeratedSet
from sage.categories.all import FiniteEnumeratedSets
from sage.groups.conjugacy_classes import ConjugacyClassGAP
@@ -181,8 +180,7 @@ def hap_decorator(f):
""" """
@wraps(f) @wraps(f)
def wrapped(self, n, p=0): def wrapped(self, n, p=0):
@ -11,7 +19,29 @@ diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/per
load_hap() load_hap()
from sage.rings.arith import is_prime from sage.rings.arith import is_prime
if not (p == 0 or is_prime(p)): if not (p == 0 or is_prime(p)):
@@ -3943,8 +3942,7 @@ class PermutationGroup_generic(group.Gro @@ -1617,9 +1615,7 @@ class PermutationGroup_generic(group.Fin
try:
return [Integer(n) for n in self._gap_().IdGroup()]
except RuntimeError:
- if not is_package_installed('database_gap'):
- raise RuntimeError("You must install the optional database_gap package first.")
- raise
+ raise RuntimeError("gap-hap package not available.")
def id(self):
"""
@@ -1670,9 +1666,7 @@ class PermutationGroup_generic(group.Fin
try:
return Integer(self._gap_().PrimitiveIdentification())
except RuntimeError:
- if not is_package_installed('database_gap'):
- raise RuntimeError("You must install the optional database_gap package first.")
- raise
+ raise RuntimeError("gap-hap package not available.")
def center(self):
"""
@@ -3959,8 +3953,7 @@ class PermutationGroup_generic(group.Fin
- David Joyner and Graham Ellis - David Joyner and Graham Ellis
""" """

View file

@ -1,7 +1,7 @@
diff -up src/sage/modular/arithgroup/farey.cpp.orig src/sage/modular/arithgroup/farey.cpp diff -up src/sage/modular/arithgroup/farey.cpp.orig src/sage/modular/arithgroup/farey.cpp
--- src/sage/modular/arithgroup/farey.cpp.orig 2014-05-26 13:28:28.975770939 -0300 --- src/sage/modular/arithgroup/farey.cpp.orig 2015-10-11 17:20:15.809728677 -0300
+++ src/sage/modular/arithgroup/farey.cpp 2014-05-26 13:28:45.777771582 -0300 +++ src/sage/modular/arithgroup/farey.cpp 2015-10-11 17:20:28.178729151 -0300
@@ -141,6 +141,7 @@ operator*(const SL2Z& M, const vector<mp @@ -136,6 +136,7 @@ operator*(const SL2Z& M, const vector<mp
return result; return result;
} }
@ -9,7 +9,7 @@ diff -up src/sage/modular/arithgroup/farey.cpp.orig src/sage/modular/arithgroup/
inline inline
mpz_class mpz_class
floor(const mpq_class r) { floor(const mpq_class r) {
@@ -151,6 +152,7 @@ floor(const mpq_class r) { @@ -146,6 +147,7 @@ floor(const mpq_class r) {
return result - 1; return result - 1;
} }
} }

View file

@ -1,13 +0,0 @@
diff -up src/sage/repl/display/formatter.py.orig src/sage/repl/display/formatter.py
--- src/sage/repl/display/formatter.py.orig 2015-04-26 11:35:47.474617033 -0300
+++ src/sage/repl/display/formatter.py 2015-04-26 11:36:17.859618196 -0300
@@ -60,7 +60,8 @@ This other facility uses a simple
#*****************************************************************************
-from IPython.core.formatters import PlainTextFormatter, warn_format_error
+from IPython.core.formatters import PlainTextFormatter
+from IPython.core.formatters import catch_format_error as warn_format_error
from IPython.utils.py3compat import str_to_unicode, unicode_to_str
from sage.repl.display.pretty_print import (

View file

@ -1,22 +1,23 @@
diff -up src/sage/interfaces/jmoldata.py.orig src/sage/interfaces/jmoldata.py diff -up src/sage/interfaces/jmoldata.py.orig src/sage/interfaces/jmoldata.py
--- src/sage/interfaces/jmoldata.py.orig 2014-08-12 14:13:57.189963669 -0300 --- src/sage/interfaces/jmoldata.py.orig 2015-10-11 17:48:03.194792527 -0300
+++ src/sage/interfaces/jmoldata.py 2014-08-12 14:16:21.359969189 -0300 +++ src/sage/interfaces/jmoldata.py 2015-10-11 17:48:39.748793927 -0300
@@ -139,8 +139,6 @@ class JmolData(SageObject): @@ -146,8 +146,6 @@ class JmolData(SageObject):
sage: print os.path.exists(testfile) # optional -- java
True True
""" """
- # Set up paths, file names and scripts - # Set up paths, file names and scripts
- jmolpath = os.path.join(SAGE_LOCAL, "share", "jmol", "JmolData.jar") - jmolpath = os.path.join(SAGE_LOCAL, "share", "jmol", "JmolData.jar")
launchscript = "" target_native = targetfile
if (datafile_cmd!='script'): import sys
launchscript = "load " if sys.platform == 'cygwin':
@@ -152,9 +150,8 @@ class JmolData(SageObject): @@ -172,10 +170,8 @@ class JmolData(SageObject):
scratchout = tmp_filename(ext=".txt") env = dict(os.environ)
with open(scratchout, 'w') as jout: env['LC_ALL'] = 'C'
# Now call the java application and write the file. env['LANG'] = 'C'
- subprocess.call(["java", "-Xmx512m", "-Djava.awt.headless=true", - subprocess.call(["java", "-Xmx512m", "-Djava.awt.headless=true",
- "-jar", jmolpath, "-iox", "-g", sizeStr, - "-jar", jmolpath, "-iox", "-g", sizeStr,
- "-J", launchscript, "-j", imagescript], stdout=jout, stderr=jout) - "-J", launchscript, "-j", imagescript],
- stdout=jout, stderr=jout, env=env)
+ subprocess.call(["jmol","-n","-g",sizeStr, + subprocess.call(["jmol","-n","-g",sizeStr,
+ "-J",launchscript,"-j",imagescript],stdout=jout) + "-J",launchscript,"-j",imagescript],stdout=jout)
if not os.path.isfile(targetfile): if not os.path.isfile(targetfile):

9
sagemath-lcalc.patch Normal file
View file

@ -0,0 +1,9 @@
diff -up src/sage/libs/lcalc/lcalc_sage.h.orig src/sage/libs/lcalc/lcalc_sage.h
--- src/sage/libs/lcalc/lcalc_sage.h.orig 2015-11-02 23:13:05.279397757 -0200
+++ src/sage/libs/lcalc/lcalc_sage.h 2015-11-02 23:13:34.402398872 -0200
@@ -1,4 +1,4 @@
-#include "libLfunction/L.h"
+#include "Lfunction/L.h"
int *new_ints(int l)
{

View file

@ -1,12 +0,0 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2015-04-03 15:08:44.096404759 -0300
+++ src/module_list.py 2015-04-03 15:08:56.856405247 -0300
@@ -2229,7 +2229,7 @@ if UNAME[0] == "Darwin" and not UNAME[2]
)
-if is_package_installed('lrcalc'):
+if 1:
ext_modules.append(
Extension('sage.libs.lrcalc.lrcalc',
sources = ["sage/libs/lrcalc/lrcalc.pyx"],

View file

@ -1,14 +1,13 @@
diff -up src/sage/geometry/polyhedron/base.py.orig src/sage/geometry/polyhedron/base.py diff -up src/sage/geometry/polyhedron/base.py.orig src/sage/geometry/polyhedron/base.py
--- src/sage/geometry/polyhedron/base.py.orig 2015-04-03 15:06:44.704400187 -0300 --- src/sage/geometry/polyhedron/base.py.orig 2015-10-11 17:54:35.252807540 -0300
+++ src/sage/geometry/polyhedron/base.py 2015-04-03 15:06:59.632400758 -0300 +++ src/sage/geometry/polyhedron/base.py 2015-10-11 17:54:41.621807784 -0300
@@ -3242,11 +3242,6 @@ class Polyhedron_base(Element): @@ -3371,10 +3371,6 @@ class Polyhedron_base(Element):
David Avis's lrs program. David Avis's lrs program.
""" """
- if is_package_installed('lrs') != True: - if not is_package_installed('lrslib'):
- print 'You must install the optional lrs package ' \ - raise NotImplementedError('You must install the optional lrslib package '
- 'for this function to work' - 'for this function to work')
- raise NotImplementedError
- -
from sage.misc.temporary_file import tmp_filename from sage.misc.temporary_file import tmp_filename
from subprocess import Popen, PIPE from subprocess import Popen, PIPE

View file

@ -1,6 +1,6 @@
diff -up src/bin/sage-maxima.lisp.orig src/bin/sage-maxima.lisp diff -up src/bin/sage-maxima.lisp.orig src/bin/sage-maxima.lisp
--- src/bin/sage-maxima.lisp.orig 2015-04-03 15:04:30.952395065 -0300 --- src/bin/sage-maxima.lisp.orig 2015-10-11 17:39:58.025773948 -0300
+++ src/bin/sage-maxima.lisp 2015-04-03 15:04:43.255395536 -0300 +++ src/bin/sage-maxima.lisp 2015-10-11 17:40:00.218774032 -0300
@@ -3,4 +3,8 @@ @@ -3,4 +3,8 @@
;(setf *general-display-prefix* "<sage-display>") ;(setf *general-display-prefix* "<sage-display>")
@ -12,9 +12,9 @@ diff -up src/bin/sage-maxima.lisp.orig src/bin/sage-maxima.lisp
+ *standard-input* (open "/dev/stdin" :direction :input) + *standard-input* (open "/dev/stdin" :direction :input)
+ *standard-output* (open "/dev/stdout" :direction :output)) + *standard-output* (open "/dev/stdout" :direction :output))
diff -up src/sage/interfaces/maxima.py.orig src/sage/interfaces/maxima.py diff -up src/sage/interfaces/maxima.py.orig src/sage/interfaces/maxima.py
--- src/sage/interfaces/maxima.py.orig 2015-04-03 15:04:24.152394805 -0300 --- src/sage/interfaces/maxima.py.orig 2015-10-11 17:39:41.677773322 -0300
+++ src/sage/interfaces/maxima.py 2015-04-03 15:04:43.256395536 -0300 +++ src/sage/interfaces/maxima.py 2015-10-11 17:40:00.219774032 -0300
@@ -551,7 +551,7 @@ class Maxima(MaximaAbstract, Expect): @@ -552,7 +552,7 @@ class Maxima(MaximaAbstract, Expect):
Expect.__init__(self, Expect.__init__(self,
name = 'maxima', name = 'maxima',
prompt = '\(\%i[0-9]+\) ', prompt = '\(\%i[0-9]+\) ',
@ -23,7 +23,7 @@ diff -up src/sage/interfaces/maxima.py.orig src/sage/interfaces/maxima.py
maxread = 10000, maxread = 10000,
script_subdirectory = script_subdirectory, script_subdirectory = script_subdirectory,
restart_on_ctrlc = False, restart_on_ctrlc = False,
@@ -601,7 +601,8 @@ class Maxima(MaximaAbstract, Expect): @@ -620,7 +620,8 @@ class Maxima(MaximaAbstract, Expect):
# Remove limit on the max heapsize (since otherwise it defaults # Remove limit on the max heapsize (since otherwise it defaults
# to 256MB with ECL). # to 256MB with ECL).
@ -32,4 +32,4 @@ diff -up src/sage/interfaces/maxima.py.orig src/sage/interfaces/maxima.py
+ self._sendline(':lisp #+gcl (progn (si:readline-off) (setf *error-output* (open "/dev/stderr" :direction :output) *standard-input* (open "/dev/stdin" :direction :input) *standard-output* (open "/dev/stdout" :direction :output))) #-gcl t') + self._sendline(':lisp #+gcl (progn (si:readline-off) (setf *error-output* (open "/dev/stderr" :direction :output) *standard-input* (open "/dev/stdin" :direction :input) *standard-output* (open "/dev/stdout" :direction :output))) #-gcl t')
self._eval_line('0;') self._eval_line('0;')
def __reduce__(self): # set random seed

View file

@ -1,12 +1,13 @@
diff -up src/sage/graphs/graph_generators.py.orig src/sage/graphs/graph_generators.py diff -up src/sage/graphs/graph_generators.py.orig src/sage/graphs/graph_generators.py
--- src/sage/graphs/graph_generators.py.orig 2015-04-03 15:07:35.008402113 -0300 --- src/sage/graphs/graph_generators.py.orig 2015-10-11 17:55:39.963810018 -0300
+++ src/sage/graphs/graph_generators.py 2015-04-03 15:07:44.816402489 -0300 +++ src/sage/graphs/graph_generators.py 2015-10-11 17:55:46.861810283 -0300
@@ -827,7 +827,7 @@ class GraphGenerators(): @@ -838,8 +838,7 @@ class GraphGenerators():
>A geng -d0D3 n=4 e=0-6
""" """
import subprocess import subprocess
from sage.misc.package import is_package_installed - from sage.misc.package import is_package_installed
- if not is_package_installed("nauty"): - if not is_package_installed("nauty"):
+ if 1: + if 1:
raise TypeError("the optional nauty package is not installed") raise TypeError("the optional nauty package is not installed")
sp = subprocess.Popen("nauty-geng {0}".format(options), shell=True, sp = subprocess.Popen("geng {0}".format(options), shell=True,
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stdout=subprocess.PIPE,

View file

@ -5,60 +5,51 @@ references to that name. This patch simply changes the name of the existing
class to avoid the name collision. class to avoid the name collision.
diff -up src/sage/libs/polybori/decl.pxd.orig src/sage/libs/polybori/decl.pxd diff -up src/sage/libs/polybori/decl.pxd.orig src/sage/libs/polybori/decl.pxd
--- src/sage/libs/polybori/decl.pxd.orig 2014-11-23 07:58:14.000000000 -0700 --- src/sage/libs/polybori/decl.pxd.orig 2015-10-11 18:10:28.994844062 -0300
+++ src/sage/libs/polybori/decl.pxd 2015-01-13 20:00:00.000000000 -0700 +++ src/sage/libs/polybori/decl.pxd 2015-10-11 18:11:16.004845863 -0300
@@ -291,10 +291,10 @@ cdef extern from "pb_wrap.h": @@ -289,10 +289,10 @@ cdef extern from "sage/libs/polybori/pb_
int (* size)() int (* size)()
PBPolyEntry (* get "operator[]")(int) PBPolyEntry (* get "operator[]")(int)
- ctypedef struct PBFglmStrategy "WrappedPtr<FGLMStrategy>": - ctypedef struct PBFglmStrategy "PBWrappedPtr<FGLMStrategy>":
+ ctypedef struct PBFglmStrategy "WrappedPointer<FGLMStrategy>": + ctypedef struct PBFglmStrategy "WrappedPointer<FGLMStrategy>":
PBPolyVector (* main "operator->()->main")() PBPolyVector (* main "operator->()->main")()
- PBFglmStrategy PBFglmStrategy_Constructor "WrappedPtr<FGLMStrategy>" \ - PBFglmStrategy PBFglmStrategy_Constructor "PBWrappedPtr<FGLMStrategy>" \
+ PBFglmStrategy PBFglmStrategy_Constructor "WrappedPointer<FGLMStrategy>" \ + PBFglmStrategy PBFglmStrategy_Constructor "WrappedPointer<FGLMStrategy>" \
(PBRing from_ring, PBRing to_ring, PBPolyVector vec) (PBRing from_ring, PBRing to_ring, PBPolyVector vec)
cdef cppclass PBGBStrategy "GroebnerStrategy": cdef cppclass PBGBStrategy "GroebnerStrategy":
@@ -349,7 +349,7 @@ cdef extern from "pb_wrap.h":
PBPolyVector (* faugereStepDense)(PBPolyVector v)
bint (* generators_leadingTerms_owns "generators.leadingTerms.owns")(PBMonom term)
- PBGBStrategy PBGBStrategy_Constructor "WrappedPtr<GroebnerStrategy>" \
+ PBGBStrategy PBGBStrategy_Constructor "WrappedPointer<GroebnerStrategy>" \
(PBRing r)
diff -up src/sage/libs/polybori/pb_wrap.h.orig src/sage/libs/polybori/pb_wrap.h diff -up src/sage/libs/polybori/pb_wrap.h.orig src/sage/libs/polybori/pb_wrap.h
--- src/sage/libs/polybori/pb_wrap.h.orig 2014-11-23 07:58:14.000000000 -0700 --- src/sage/libs/polybori/pb_wrap.h.orig 2015-10-11 18:10:35.738844321 -0300
+++ src/sage/libs/polybori/pb_wrap.h 2015-01-13 20:00:00.000000000 -0700 +++ src/sage/libs/polybori/pb_wrap.h 2015-10-11 18:12:42.724849183 -0300
@@ -177,23 +177,23 @@ PyObject* preallocated_to_PyString(const @@ -177,23 +177,23 @@ PyObject* preallocated_to_PyString(const
template <class Type> template <class Type>
-class WrappedPtr: -class PBWrappedPtr:
+class WrappedPointer: +class WrappedPointer:
public boost::shared_ptr<Type> { public boost::shared_ptr<Type> {
- typedef WrappedPtr self; - typedef PBWrappedPtr self;
+ typedef WrappedPointer self; + typedef WrappedPointer self;
typedef boost::shared_ptr<Type> base; typedef boost::shared_ptr<Type> base;
public: public:
- WrappedPtr(): base() {} - PBWrappedPtr(): base() {}
- WrappedPtr(const self& rhs): base(rhs) {} - PBWrappedPtr(const self& rhs): base(rhs) {}
+ WrappedPointer(): base() {} + WrappedPointer(): base() {}
+ WrappedPointer(const self& rhs): base(rhs) {} + WrappedPointer(const self& rhs): base(rhs) {}
template <class T1> template <class T1>
- WrappedPtr(const T1& arg): base(new Type(arg)) {} - PBWrappedPtr(const T1& arg): base(new Type(arg)) {}
+ WrappedPointer(const T1& arg): base(new Type(arg)) {} + WrappedPointer(const T1& arg): base(new Type(arg)) {}
template <class T1, class T2> template <class T1, class T2>
- WrappedPtr(const T1& arg1, const T2& arg2): base(new Type(arg1, arg2)) {} - PBWrappedPtr(const T1& arg1, const T2& arg2): base(new Type(arg1, arg2)) {}
+ WrappedPointer(const T1& arg1, const T2& arg2): base(new Type(arg1, arg2)) {} + WrappedPointer(const T1& arg1, const T2& arg2): base(new Type(arg1, arg2)) {}
template <class T1, class T2, class T3> template <class T1, class T2, class T3>
- WrappedPtr(const T1& arg1, const T2& arg2, const T3& arg3): - PBWrappedPtr(const T1& arg1, const T2& arg2, const T3& arg3):
+ WrappedPointer(const T1& arg1, const T2& arg2, const T3& arg3): + WrappedPointer(const T1& arg1, const T2& arg2, const T3& arg3):
base(new Type(arg1, arg2, arg3)) {} base(new Type(arg1, arg2, arg3)) {}

View file

@ -1,50 +1,6 @@
--- ./src/c_lib/include/ntl_wrap.h.orig 2015-02-16 17:15:08.000000000 -0700 diff -up src/sage/rings/bernmm/bernmm-test.cpp.orig src/sage/rings/bernmm/bernmm-test.cpp
+++ ./src/c_lib/include/ntl_wrap.h 2015-09-25 13:51:18.989444339 -0600 --- src/sage/rings/bernmm/bernmm-test.cpp.orig 2015-10-11 18:17:42.808860675 -0300
@@ -35,7 +35,7 @@ using namespace NTL; +++ src/sage/rings/bernmm/bernmm-test.cpp 2015-10-11 18:18:44.684863044 -0300
EXTERN void del_charstar(char*);
-EXTERN void setup_NTL_error_callback(void (*function)(const char*, void*), void* context);
+EXTERN void setup_NTL_error_callback(void (*function)(const char*));
//////// ZZ //////////
--- ./src/c_lib/src/ntl_wrap.cpp.orig 2015-02-16 17:15:08.000000000 -0700
+++ ./src/c_lib/src/ntl_wrap.cpp 2015-09-25 13:49:54.636142928 -0600
@@ -12,9 +12,9 @@ void del_charstar(char* a) {
}
-void setup_NTL_error_callback(void (*function)(const char*, void*), void* context)
+void setup_NTL_error_callback(void (*function)(const char*))
{
- NTL::SetErrorCallbackFunction(function, context);
+ NTL::ErrorMsgCallback = function;
}
--- ./src/c_lib/src/stdsage.c.orig 2015-02-16 17:15:08.000000000 -0700
+++ ./src/c_lib/src/stdsage.c 2015-09-25 13:50:22.081963425 -0600
@@ -36,7 +36,7 @@ void init_global_empty_tuple(void) {
We raise a RuntimeError and then call sig_error() such that the
exception will be seen by sig_on().
*/
-void global_NTL_error_callback(const char* s, void* context)
+void global_NTL_error_callback(const char* s)
{
PyErr_SetString(PyExc_RuntimeError, s);
sig_error();
@@ -49,7 +49,7 @@ void init_csage() {
init_global_empty_tuple();
init_memory_functions();
setup_sage_signal_handler();
- setup_NTL_error_callback(global_NTL_error_callback, NULL);
+ setup_NTL_error_callback(global_NTL_error_callback);
}
/* This is called once for every single module that links in stdsage */
--- ./src/sage/rings/bernmm/bernmm-test.cpp.orig 2015-02-16 17:15:12.000000000 -0700
+++ ./src/sage/rings/bernmm/bernmm-test.cpp 2015-09-26 09:19:00.830399741 -0600
@@ -70,7 +70,7 @@ void bern_naive(mpq_t* res, long n) @@ -70,7 +70,7 @@ void bern_naive(mpq_t* res, long n)
*/ */
int testcase__bern_modp_powg(long p, long k, mpq_t b) int testcase__bern_modp_powg(long p, long k, mpq_t b)
@ -63,8 +19,9 @@
if (PowerMod(2, k, p, pinv) == 1) if (PowerMod(2, k, p, pinv) == 1)
return 1; return 1;
--- ./src/sage/rings/bernmm/bern_modp.cpp.orig 2015-02-16 17:15:12.000000000 -0700 diff -up src/sage/rings/bernmm/bern_modp.cpp.orig src/sage/rings/bernmm/bern_modp.cpp
+++ ./src/sage/rings/bernmm/bern_modp.cpp 2015-09-26 14:15:34.862360481 -0600 --- src/sage/rings/bernmm/bern_modp.cpp.orig 2015-10-11 18:17:42.814860675 -0300
+++ src/sage/rings/bernmm/bern_modp.cpp 2015-10-11 18:20:28.077867003 -0300
@@ -43,14 +43,14 @@ namespace bernmm { @@ -43,14 +43,14 @@ namespace bernmm {
pinv = 1 / ((double) p) pinv = 1 / ((double) p)
g = a multiplicative generator of GF(p), in [0, p) g = a multiplicative generator of GF(p), in [0, p)
@ -118,15 +75,6 @@
{ {
Factorisation F(p-1); Factorisation F(p-1);
long g = primitive_root(p, pinv, F); long g = primitive_root(p, pinv, F);
@@ -717,7 +717,7 @@ long _bern_modp_pow2(long p, double pinv
2 <= k <= p-3, k even
pinv = 1 / ((double) p)
*/
-long _bern_modp(long p, double pinv, long k)
+long _bern_modp(long p, mulmod_t pinv, long k)
{
if (PowerMod(2, k, p, pinv) != 1)
// 2^k != 1 mod p, so we use the faster version
@@ -765,7 +765,7 @@ long bern_modp(long p, long k) @@ -765,7 +765,7 @@ long bern_modp(long p, long k)
if (m == 0) if (m == 0)
return -1; return -1;
@ -136,8 +84,9 @@
long x = _bern_modp(p, pinv, m); // = B_m/m mod p long x = _bern_modp(p, pinv, m); // = B_m/m mod p
return MulMod(x, k, p, pinv); return MulMod(x, k, p, pinv);
} }
--- ./src/sage/rings/bernmm/bern_modp.h.orig 2015-02-16 17:15:12.000000000 -0700 diff -up src/sage/rings/bernmm/bern_modp.h.orig src/sage/rings/bernmm/bern_modp.h
+++ ./src/sage/rings/bernmm/bern_modp.h 2015-09-26 09:19:28.365229754 -0600 --- src/sage/rings/bernmm/bern_modp.h.orig 2015-10-11 18:17:42.820860675 -0300
+++ src/sage/rings/bernmm/bern_modp.h 2015-10-11 18:20:53.453867975 -0300
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
#ifndef BERNMM_BERN_MODP_H #ifndef BERNMM_BERN_MODP_H
#define BERNMM_BERN_MODP_H #define BERNMM_BERN_MODP_H
@ -157,8 +106,9 @@
}; };
--- ./src/sage/rings/bernmm/bern_modp_util.cpp.orig 2015-02-16 17:15:12.000000000 -0700 diff -up src/sage/rings/bernmm/bern_modp_util.cpp.orig src/sage/rings/bernmm/bern_modp_util.cpp
+++ ./src/sage/rings/bernmm/bern_modp_util.cpp 2015-09-26 09:19:57.474935651 -0600 --- src/sage/rings/bernmm/bern_modp_util.cpp.orig 2015-10-11 18:17:42.825860675 -0300
+++ src/sage/rings/bernmm/bern_modp_util.cpp 2015-10-11 18:21:24.653869170 -0300
@@ -20,7 +20,7 @@ NTL_CLIENT; @@ -20,7 +20,7 @@ NTL_CLIENT;
namespace bernmm { namespace bernmm {
@ -186,8 +136,9 @@
{ {
if (p == 2) if (p == 2)
return 1; return 1;
--- ./src/sage/rings/bernmm/bern_modp_util.h.orig 2015-02-16 17:15:12.000000000 -0700 diff -up src/sage/rings/bernmm/bern_modp_util.h.orig src/sage/rings/bernmm/bern_modp_util.h
+++ ./src/sage/rings/bernmm/bern_modp_util.h 2015-09-26 09:20:26.423623021 -0600 --- src/sage/rings/bernmm/bern_modp_util.h.orig 2015-10-11 18:17:42.830860676 -0300
+++ src/sage/rings/bernmm/bern_modp_util.h 2015-10-11 18:21:58.044870449 -0300
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -221,3 +172,15 @@
}; // end namespace }; // end namespace
diff -up src/sage/rings/bernmm/bern_modp.cpp.orig src/sage/rings/bernmm/bern_modp.cpp
--- src/sage/rings/bernmm/bern_modp.cpp.orig 2015-11-02 23:58:56.669503117 -0200
+++ src/sage/rings/bernmm/bern_modp.cpp 2015-11-02 23:59:15.683503846 -0200
@@ -717,7 +717,7 @@ long _bern_modp_pow2(long p, mulmod_t pi
2 <= k <= p-3, k even
pinv = 1 / ((double) p)
*/
-long _bern_modp(long p, double pinv, long k)
+long _bern_modp(long p, mulmod_t pinv, long k)
{
if (PowerMod(2, k, p, pinv) != 1)
// 2^k != 1 mod p, so we use the faster version

View file

@ -1,15 +0,0 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2015-04-03 15:39:22.360475152 -0300
+++ src/module_list.py 2015-04-03 15:39:37.470475731 -0300
@@ -2110,11 +2110,6 @@ ext_modules = [
Extension('sage.tests.interrupt',
sources = ['sage/tests/interrupt.pyx', 'sage/tests/c_lib.c']),
- Extension('sage.tests.parallel',
- sources = ['sage/tests/parallel.pyx'],
- extra_compile_args=["-fopenmp"],
- extra_link_args=["-fopenmp"]),
-
Extension('sage.tests.stl_vector',
sources = ['sage/tests/stl_vector.pyx'],
libraries = ['gmp'],

View file

@ -1,24 +1,16 @@
diff -up src/sage/libs/pari/decl.pxi.orig src/sage/libs/pari/decl.pxi diff -up src/sage/libs/pari/handle_error.pxd.orig src/sage/libs/pari/handle_error.pxd
--- src/sage/libs/pari/decl.pxi.orig 2015-04-03 17:09:59.840683372 -0300 --- src/sage/libs/pari/handle_error.pxd.orig 2015-10-11 17:43:43.037782565 -0300
+++ src/sage/libs/pari/decl.pxi 2015-04-03 17:10:10.876683795 -0300 +++ src/sage/libs/pari/handle_error.pxd 2015-10-11 17:46:28.004788882 -0300
@@ -165,7 +165,6 @@ cdef extern from 'parisage.h': @@ -1,5 +1,5 @@
extern int new_galois_format, precdl include 'sage/libs/pari/decl.pxi'
# The "except 0" here is to ensure compatibility with
# _pari_err_handle() in handle_error.pyx
- extern int (*cb_pari_err_handle)(GEN) except 0
extern int (*cb_pari_handle_exception)(long) except 0
extern void (*cb_pari_err_recover)(long)
@@ -3757,6 +3756,3 @@ cdef extern from 'pari/paripriv.h': cdef void _pari_init_error_handling()
unsigned long flags -cdef int _pari_err_handle(GEN E) except 0
+cdef int _pari_handle_exception(long errnum_unused) except 0
extern gp_data* GP_DATA cdef void _pari_err_recover(long errnum)
-
-cdef extern from 'pari/anal.h':
- char* closure_func_err()
diff -up src/sage/libs/pari/handle_error.pyx.orig src/sage/libs/pari/handle_error.pyx diff -up src/sage/libs/pari/handle_error.pyx.orig src/sage/libs/pari/handle_error.pyx
--- src/sage/libs/pari/handle_error.pyx.orig 2015-04-03 17:09:59.842683372 -0300 --- src/sage/libs/pari/handle_error.pyx.orig 2015-10-11 17:43:43.023782564 -0300
+++ src/sage/libs/pari/handle_error.pyx 2015-04-03 17:10:10.876683795 -0300 +++ src/sage/libs/pari/handle_error.pyx 2015-10-11 17:45:11.844785966 -0300
@@ -131,13 +131,13 @@ cdef void _pari_init_error_handling(): @@ -131,13 +131,13 @@ cdef void _pari_init_error_handling():
sage: pari('warning("test")') sage: pari('warning("test")')
*** user warning: test *** user warning: test
@ -61,9 +53,9 @@ diff -up src/sage/libs/pari/handle_error.pyx.orig src/sage/libs/pari/handle_erro
finally: finally:
pari_free(errstr) pari_free(errstr)
diff -up src/sage/libs/pari/pari_instance.pxd.orig src/sage/libs/pari/pari_instance.pxd diff -up src/sage/libs/pari/pari_instance.pxd.orig src/sage/libs/pari/pari_instance.pxd
--- src/sage/libs/pari/pari_instance.pxd.orig 2015-04-03 17:09:59.834683372 -0300 --- src/sage/libs/pari/pari_instance.pxd.orig 2015-10-11 17:43:43.028782564 -0300
+++ src/sage/libs/pari/pari_instance.pxd 2015-04-03 17:10:10.874683795 -0300 +++ src/sage/libs/pari/pari_instance.pxd 2015-10-11 17:45:37.884786963 -0300
@@ -6,6 +6,10 @@ cimport cython @@ -7,6 +7,10 @@ cimport cython
from sage.libs.pari.gen cimport gen from sage.libs.pari.gen cimport gen
@ -73,11 +65,11 @@ diff -up src/sage/libs/pari/pari_instance.pxd.orig src/sage/libs/pari/pari_insta
+ +
cpdef long prec_bits_to_words(unsigned long prec_in_bits) cpdef long prec_bits_to_words(unsigned long prec_in_bits)
@cython.final cdef class PariInstance_auto(ParentWithBase):
diff -up src/sage/libs/pari/pari_instance.pyx.orig src/sage/libs/pari/pari_instance.pyx diff -up src/sage/libs/pari/pari_instance.pyx.orig src/sage/libs/pari/pari_instance.pyx
--- src/sage/libs/pari/pari_instance.pyx.orig 2015-04-03 17:09:59.835683372 -0300 --- src/sage/libs/pari/pari_instance.pyx.orig 2015-10-11 17:43:43.032782565 -0300
+++ src/sage/libs/pari/pari_instance.pyx 2015-04-03 17:10:10.874683795 -0300 +++ src/sage/libs/pari/pari_instance.pyx 2015-10-11 17:46:14.596788369 -0300
@@ -417,7 +417,12 @@ cdef class PariInstance(sage.structure.p @@ -429,7 +429,12 @@ cdef class PariInstance(PariInstance_aut
# The size here doesn't really matter, because we will allocate # The size here doesn't really matter, because we will allocate
# our own stack anyway. We ask PARI not to set up signal and # our own stack anyway. We ask PARI not to set up signal and
# error handlers. # error handlers.
@ -88,15 +80,5 @@ diff -up src/sage/libs/pari/pari_instance.pyx.orig src/sage/libs/pari/pari_insta
pari_init_opts(10000, maxprime, INIT_DFTm) pari_init_opts(10000, maxprime, INIT_DFTm)
+ mp_set_memory_functions(_gmp_malloc, _gmp_realloc, _gmp_free) + mp_set_memory_functions(_gmp_malloc, _gmp_realloc, _gmp_free)
_pari_init_error_handling() # Disable PARI's stack overflow checking which is incompatible
# with multi-threading.
diff -up src/sage/libs/pari/handle_error.pxd.orig src/sage/libs/pari/handle_error.pxd
--- src/sage/libs/pari/handle_error.pxd.orig 2015-04-03 17:14:16.506693201 -0300
+++ src/sage/libs/pari/handle_error.pxd 2015-04-03 17:14:44.287694265 -0300
@@ -1,5 +1,5 @@
include 'sage/libs/pari/decl.pxi'
cdef void _pari_init_error_handling()
-cdef int _pari_err_handle(GEN E) except 0
+cdef int _pari_handle_exception(long errnum_unused) except 0
cdef void _pari_err_recover(long errnum)

View file

@ -1,30 +1,39 @@
diff -up src/module_list.py.orig src/module_list.py diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2015-04-03 15:03:27.647392641 -0300 --- src/module_list.py.orig 2015-10-11 18:06:18.785834481 -0300
+++ src/module_list.py 2015-04-03 15:03:57.589393787 -0300 +++ src/module_list.py 2015-10-11 18:06:31.557834970 -0300
@@ -1097,7 +1097,7 @@ ext_modules = [ @@ -90,7 +90,7 @@ library_order_list = [
"polybori_groebner-" + polybori_major_version,
"m4rie", "m4ri",
"zn_poly", "gap",
- "gd", "png12",
+ "gd", "png",
"m", "readline", "Lfunction",
BLAS, BLAS2,
"cryptominisat", "fplll", "z"]
@@ -903,7 +903,7 @@ ext_modules = [
Extension('sage.matrix.matrix_mod2_dense', Extension('sage.matrix.matrix_mod2_dense',
sources = ['sage/matrix/matrix_mod2_dense.pyx'], sources = ['sage/matrix/matrix_mod2_dense.pyx'],
- libraries = ['gmp','m4ri', 'gd', 'png12', 'z'], - libraries = ['m4ri', 'gd', 'png12', 'z'],
+ libraries = ['gmp','m4ri', 'gd', 'png', 'z'], + libraries = ['m4ri', 'gd', 'png', 'z'],
extra_compile_args = m4ri_extra_compile_args, extra_compile_args = m4ri_extra_compile_args,
depends = [SAGE_INC + "/png.h", SAGE_INC + "/m4ri/m4ri.h"]), depends = [SAGE_INC + "/png.h", SAGE_INC + "/m4ri/m4ri.h"]),
@@ -1398,7 +1398,7 @@ ext_modules = [ @@ -1063,7 +1063,7 @@ ext_modules = [
Extension('sage.modules.vector_mod2_dense', Extension('sage.modules.vector_mod2_dense',
sources = ['sage/modules/vector_mod2_dense.pyx'], sources = ['sage/modules/vector_mod2_dense.pyx'],
- libraries = ['gmp','m4ri', 'png12', 'gd'], - libraries = ['m4ri', 'png12', 'gd'],
+ libraries = ['gmp','m4ri', 'png', 'gd'], + libraries = ['m4ri', 'png', 'gd'],
extra_compile_args = m4ri_extra_compile_args, extra_compile_args = m4ri_extra_compile_args,
depends = [SAGE_INC + "/png.h", SAGE_INC + "/m4ri/m4ri.h"]), depends = [SAGE_INC + "/png.h", SAGE_INC + "/m4ri/m4ri.h"]),
@@ -1912,7 +1912,7 @@ ext_modules = [ @@ -1550,7 +1550,7 @@ ext_modules = [
Extension('sage.rings.polynomial.pbori', Extension('sage.rings.polynomial.pbori',
sources = ['sage/rings/polynomial/pbori.pyx'], sources = ['sage/rings/polynomial/pbori.pyx'],
libraries=['polybori-' + polybori_major_version, libraries=['polybori-' + polybori_major_version,
- 'polybori_groebner-' + polybori_major_version, 'm4ri', 'gd', 'png12'], - 'polybori_groebner-' + polybori_major_version, 'm4ri', 'gd', 'png12'],
+ 'polybori_groebner-' + polybori_major_version, 'm4ri', 'gd', 'png'], + 'polybori_groebner-' + polybori_major_version, 'm4ri', 'gd', 'png'],
include_dirs = [SAGE_INC, "sage/libs/polybori"],
depends = [SAGE_INC + "/polybori/" + hd + ".h" for hd in ["polybori", "config"] ] + \ depends = [SAGE_INC + "/polybori/" + hd + ".h" for hd in ["polybori", "config"] ] + \
[SAGE_INC + '/m4ri/m4ri.h'], [SAGE_INC + '/m4ri/m4ri.h'],
extra_compile_args = polybori_extra_compile_args + m4ri_extra_compile_args,

View file

@ -1,7 +1,7 @@
diff -up src/sage/libs/polybori/decl.pxd.orig src/sage/libs/polybori/decl.pxd diff -up src/sage/libs/polybori/decl.pxd.orig src/sage/libs/polybori/decl.pxd
--- src/sage/libs/polybori/decl.pxd.orig 2015-09-06 21:05:55.575916057 -0300 --- src/sage/libs/polybori/decl.pxd.orig 2015-10-11 18:23:04.338872987 -0300
+++ src/sage/libs/polybori/decl.pxd 2015-09-06 21:05:57.745916140 -0300 +++ src/sage/libs/polybori/decl.pxd 2015-10-11 18:23:09.548873187 -0300
@@ -12,8 +12,8 @@ cdef extern from "pb_wrap.h": @@ -10,8 +10,8 @@ cdef extern from "sage/libs/polybori/pb_
pbdp_asc "CTypes::dp_asc" pbdp_asc "CTypes::dp_asc"
pbblock_dlex "CTypes::block_dlex" pbblock_dlex "CTypes::block_dlex"
pbblock_dp_asc "CTypes::block_dp_asc" pbblock_dp_asc "CTypes::block_dp_asc"

View file

@ -1,7 +1,7 @@
diff -up src/sage/all.py.orig src/sage/all.py diff -up src/sage/all.py.orig src/sage/all.py
--- src/sage/all.py.orig 2015-04-03 15:01:52.463388996 -0300 --- src/sage/all.py.orig 2015-10-11 17:37:19.705767886 -0300
+++ src/sage/all.py 2015-04-03 15:02:06.559389536 -0300 +++ src/sage/all.py 2015-10-11 17:37:41.748768730 -0300
@@ -296,11 +296,11 @@ def _write_started_file(): @@ -294,11 +294,11 @@ def _write_started_file():
Check that the file exists when Sage is running:: Check that the file exists when Sage is running::
@ -12,6 +12,6 @@ diff -up src/sage/all.py.orig src/sage/all.py
""" """
- started_file = os.path.join(SAGE_LOCAL, 'etc', 'sage-started.txt') - started_file = os.path.join(SAGE_LOCAL, 'etc', 'sage-started.txt')
+ started_file = os.path.join(DOT_SAGE, 'sage-started.txt') + started_file = os.path.join(DOT_SAGE, 'sage-started.txt')
# Do nothing if the file already exists
if os.path.isfile(started_file): # Current time with a resolution of 1 second
return import datetime

View file

@ -1,7 +1,7 @@
diff -up src/module_list.py.orig src/module_list.py diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2015-04-03 14:55:44.607374909 -0300 --- src/module_list.py.orig 2015-12-09 18:09:26.357141568 -0200
+++ src/module_list.py 2015-04-03 14:56:03.416375630 -0300 +++ src/module_list.py 2015-12-09 18:09:36.501141956 -0200
@@ -4,7 +4,7 @@ import os @@ -3,7 +3,7 @@ from glob import glob
from distutils.extension import Extension from distutils.extension import Extension
from sage.env import SAGE_LOCAL from sage.env import SAGE_LOCAL
@ -10,21 +10,7 @@ diff -up src/module_list.py.orig src/module_list.py
######################################################### #########################################################
### BLAS setup ### BLAS setup
@@ -35,10 +35,11 @@ else: @@ -66,7 +66,7 @@ givaro_extra_compile_args =['-D__STDC_LI
### Commonly used definitions
#########################################################
-numpy_include_dirs = [SAGE_LOCAL + '/lib/python/site-packages/numpy/core/include']
+from distutils.sysconfig import get_python_lib
+numpy_include_dirs = [get_python_lib(1) + '/numpy/core/include']
# We pick a file from numpy which is autogenerated so it has the
# timestamp of the numpy build.
-numpy_depends = [SAGE_LOCAL + '/lib/python/site-packages/numpy/core/include/numpy/_numpyconfig.h']
+numpy_depends = [get_python_lib(1) + '/numpy/core/include/numpy/_numpyconfig.h']
flint_depends = [SAGE_INC + '/flint/flint.h']
singular_depends = [SAGE_INC + '/libsingular.h']
@@ -71,7 +72,7 @@ givaro_extra_compile_args =['-D__STDC_LI
### PolyBoRi settings ### PolyBoRi settings
######################################################### #########################################################
@ -32,48 +18,33 @@ diff -up src/module_list.py.orig src/module_list.py
+polybori_extra_compile_args = ['-DPBORI_USE_ORIGINAL_CUDD'] +polybori_extra_compile_args = ['-DPBORI_USE_ORIGINAL_CUDD']
polybori_major_version = '0.8' polybori_major_version = '0.8'
#########################################################
@@ -746,7 +747,7 @@ ext_modules = [
sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'],
libraries = ['m', 'ntl', 'mpfr', 'gmp', 'gmpxx',
'Lfunction'],
- include_dirs = [SAGE_INC + "/libLfunction"],
+ include_dirs = [SAGE_INC + "/Lfunction"],
extra_compile_args=["-O3", "-ffast-math"],
language = 'c++'),
diff -up src/setup.py.orig src/setup.py diff -up src/setup.py.orig src/setup.py
--- src/setup.py.orig 2015-04-03 14:56:00.033375500 -0300 --- src/setup.py.orig 2015-12-09 18:09:33.813141853 -0200
+++ src/setup.py 2015-04-03 14:56:03.416375630 -0300 +++ src/setup.py 2015-12-09 18:13:21.819150584 -0200
@@ -36,11 +36,11 @@ except KeyError: @@ -64,6 +64,7 @@ except KeyError:
compile_result_dir = None
keep_going = False keep_going = False
-SAGE_INC = os.path.join(SAGE_LOCAL, 'include')
+SAGE_INC = '/usr/include'
# search for dependencies and add to gcc -I<path> # search for dependencies and add to gcc -I<path>
include_dirs = [SAGE_INC, +SAGE_INC = '/usr/include'
- os.path.join(SAGE_INC, 'csage'), include_dirs = sage_include_directories(use_sources=True)
+ 'c_lib/include',
SAGE_SRC,
os.path.join(SAGE_SRC, 'sage', 'ext')]
@@ -171,10 +171,12 @@ for m in ext_modules: # Manually add -fno-strict-aliasing, which is needed to compile Cython
m.libraries = ['csage'] + m.libraries @@ -567,11 +568,9 @@ def run_cythonize():
if m.language == 'c++': print('Enabling Cython profiling support')
m.libraries.append('stdc++') profile = True
+ m.libraries.append('ntl')
+ m.libraries = m.libraries + ['gmp', 'm', 'dl']
m.extra_compile_args = m.extra_compile_args + extra_compile_args - # Disable Cython caching (the cache is stored in ~/.cycache which is
m.extra_link_args = m.extra_link_args + extra_link_args + # Enable Cython caching (the cache is stored in ~/.cycache which is
- m.library_dirs = m.library_dirs + [os.path.join(SAGE_LOCAL, "lib")] # Cython's default).
+ m.library_dirs += ['c_lib', '%s/lib' % SAGE_LOCAL] - # Cycache is currently too broken to use reliably:
m.include_dirs = m.include_dirs + include_dirs - # http://trac.sagemath.org/ticket/17851
- Cython.Compiler.Main.default_options['cache'] = False
+ Cython.Compiler.Main.default_options['cache'] = True
force = True
@@ -579,20 +581,6 @@ print "Discovered Python source, time: % version_file = os.path.join(os.path.dirname(__file__), '.cython_version')
@@ -620,21 +619,6 @@ print("Discovered Python/Cython sources,
######################################################### #########################################################
@ -86,7 +57,8 @@ diff -up src/setup.py.orig src/setup.py
-output_dirs = SITE_PACKAGES + glob.glob(os.path.join(SAGE_SRC, 'build', 'lib*')) -output_dirs = SITE_PACKAGES + glob.glob(os.path.join(SAGE_SRC, 'build', 'lib*'))
-for output_dir in output_dirs: -for output_dir in output_dirs:
- print('- cleaning {0}'.format(output_dir)) - print('- cleaning {0}'.format(output_dir))
- clean_install_dir(output_dir, python_packages, python_modules, ext_modules) - clean_install_dir(output_dir, python_packages, python_modules,
- ext_modules, python_data_files)
-print('Finished cleaning, time: %.2f seconds.' % (time.time() - t)) -print('Finished cleaning, time: %.2f seconds.' % (time.time() - t))
- -
- -

View file

@ -1,6 +1,6 @@
diff -up src/doc/common/builder.py.orig src/doc/common/builder.py diff -up src/doc/common/builder.py.orig src/doc/common/builder.py
--- src/doc/common/builder.py.orig 2015-04-03 14:56:53.775377558 -0300 --- src/doc/common/builder.py.orig 2015-12-22 10:55:07.586513923 -0200
+++ src/doc/common/builder.py 2015-04-03 14:56:58.208377728 -0300 +++ src/doc/common/builder.py 2015-12-22 10:55:10.131514020 -0200
@@ -32,7 +32,7 @@ from sage.env import SAGE_DOC, SAGE_SRC @@ -32,7 +32,7 @@ from sage.env import SAGE_DOC, SAGE_SRC
# SAGE_DOC, LANGUAGES, SPHINXOPTS, PAPER, OMIT, # SAGE_DOC, LANGUAGES, SPHINXOPTS, PAPER, OMIT,
# PAPEROPTS, ALLSPHINXOPTS, NUM_THREADS, WEBSITESPHINXOPTS # PAPEROPTS, ALLSPHINXOPTS, NUM_THREADS, WEBSITESPHINXOPTS
@ -10,9 +10,39 @@ diff -up src/doc/common/builder.py.orig src/doc/common/builder.py
exec(compile(open(fpath).read(), fpath, 'exec')) exec(compile(open(fpath).read(), fpath, 'exec'))
@@ -303,12 +303,12 @@ class AllBuilder(object):
# apply_async does not, so don't use it.
x = pool.map_async(build_other_doc, L, 1)
try:
- x.get(99999)
+ x.get(3600)
pool.close()
pool.join()
except Exception:
- pool.terminate()
if ABORT_ON_ERROR:
+ pool.terminate()
raise
logger.warning("Elapsed time: %.1f seconds."%(time.time()-start))
logger.warning("Done building the documentation!")
@@ -500,12 +500,12 @@ class ReferenceBuilder(AllBuilder):
# (See comment in AllBuilder._wrapper about using map instead of apply.)
x = pool.map_async(build_ref_doc, L, 1)
try:
- x.get(99999)
+ x.get(3600)
pool.close()
pool.join()
except Exception:
- pool.terminate()
if ABORT_ON_ERROR:
+ pool.terminate()
raise
# The html refman must be build at the end to ensure correct
# merging of indexes and inventories.
diff -up src/doc/common/conf.py.orig src/doc/common/conf.py diff -up src/doc/common/conf.py.orig src/doc/common/conf.py
--- src/doc/common/conf.py.orig 2015-04-03 14:56:53.777377558 -0300 --- src/doc/common/conf.py.orig 2015-12-22 10:55:07.588513923 -0200
+++ src/doc/common/conf.py 2015-04-03 14:56:58.208377728 -0300 +++ src/doc/common/conf.py 2015-12-22 10:55:10.132514020 -0200
@@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
import sys, os, sphinx import sys, os, sphinx
-from sage.env import SAGE_DOC -from sage.env import SAGE_DOC
@ -20,7 +50,7 @@ diff -up src/doc/common/conf.py.orig src/doc/common/conf.py
from datetime import date from datetime import date
def get_doc_abspath(path): def get_doc_abspath(path):
@@ -203,8 +203,7 @@ if (os.environ.get('SAGE_DOC_MATHJAX', ' @@ -224,8 +224,7 @@ if (os.environ.get('SAGE_DOC_MATHJAX', '
from sage.misc.latex_macros import sage_mathjax_macros from sage.misc.latex_macros import sage_mathjax_macros
html_theme_options['mathjax_macros'] = sage_mathjax_macros() html_theme_options['mathjax_macros'] = sage_mathjax_macros()
@ -30,10 +60,27 @@ diff -up src/doc/common/conf.py.orig src/doc/common/conf.py
mathjax_relative = os.path.join('sagenb','data','mathjax') mathjax_relative = os.path.join('sagenb','data','mathjax')
# It would be really nice if sphinx would copy the entire mathjax directory, # It would be really nice if sphinx would copy the entire mathjax directory,
diff -up src/doc/common/multidocs.py.orig src/doc/common/multidocs.py
--- src/doc/common/multidocs.py.orig 2015-12-22 10:55:07.591513923 -0200
+++ src/doc/common/multidocs.py 2015-12-22 10:55:10.132514020 -0200
@@ -73,8 +73,11 @@ def merge_environment(app, env):
for ind in newalldoc:
# treat subdocument source as orphaned file and don't complain
md = env.metadata.get(ind, set())
- md.add('orphan')
- env.metadata[ind] = md
+ try:
+ md.add('orphan')
+ env.metadata[ind] = md
+ except AttributeError:
+ env.metadata[ind] = {'orphan'}
# merge the citations
newcite = {}
for ind, (path, tag) in docenv.citations.iteritems():
diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py
--- src/sage/doctest/control.py.orig 2015-04-03 14:56:32.065376727 -0300 --- src/sage/doctest/control.py.orig 2015-12-22 10:55:07.592513923 -0200
+++ src/sage/doctest/control.py 2015-04-03 14:56:58.209377728 -0300 +++ src/sage/doctest/control.py 2015-12-22 10:55:27.152514672 -0200
@@ -89,7 +89,6 @@ class DocTestDefaults(SageObject): @@ -90,7 +90,6 @@ class DocTestDefaults(SageObject):
self.valgrind = False self.valgrind = False
self.massif = False self.massif = False
self.cachegrind = False self.cachegrind = False
@ -41,7 +88,7 @@ diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py
self.failed = False self.failed = False
self.new = False self.new = False
self.show_skipped = False self.show_skipped = False
@@ -211,7 +210,7 @@ class DocTestController(SageObject): @@ -212,7 +211,7 @@ class DocTestController(SageObject):
if options.gdb or options.debug: if options.gdb or options.debug:
# Interactive debuggers: "infinite" timeout # Interactive debuggers: "infinite" timeout
options.timeout = 0 options.timeout = 0
@ -50,7 +97,15 @@ diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py
# Non-interactive debuggers: 48 hours # Non-interactive debuggers: 48 hours
options.timeout = int(os.getenv('SAGE_TIMEOUT_VALGRIND', 48 * 60 * 60)) options.timeout = int(os.getenv('SAGE_TIMEOUT_VALGRIND', 48 * 60 * 60))
elif options.long: elif options.long:
@@ -890,13 +889,8 @@ class DocTestController(SageObject): @@ -545,7 +544,6 @@ class DocTestController(SageObject):
def all_files():
from glob import glob
self.files.append(opj(SAGE_SRC, 'sage'))
- self.files.append(opj(SAGE_SRC, 'sage_setup'))
self.files.append(opj(SAGE_SRC, 'doc', 'common'))
self.files.extend(glob(opj(SAGE_SRC, 'doc', '[a-z][a-z]')))
self.options.sagenb = True
@@ -940,13 +938,8 @@ class DocTestController(SageObject):
elif opt.cachegrind: elif opt.cachegrind:
toolname = "cachegrind" toolname = "cachegrind"
flags = os.getenv("SAGE_CACHEGRIND_FLAGS", "") flags = os.getenv("SAGE_CACHEGRIND_FLAGS", "")
@ -64,7 +119,7 @@ diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py
if "%s" in flags: if "%s" in flags:
flags %= toolname + ".%p" # replace %s with toolname flags %= toolname + ".%p" # replace %s with toolname
cmd += flags + sage_cmd cmd += flags + sage_cmd
@@ -956,10 +950,10 @@ class DocTestController(SageObject): @@ -1006,10 +999,10 @@ class DocTestController(SageObject):
0 0
""" """
opt = self.options opt = self.options
@ -78,9 +133,9 @@ diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py
return self.run_val_gdb() return self.run_val_gdb()
else: else:
diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py
--- src/sage/interfaces/singular.py.orig 2015-04-03 14:56:32.066376727 -0300 --- src/sage/interfaces/singular.py.orig 2015-12-22 10:55:07.594513923 -0200
+++ src/sage/interfaces/singular.py 2015-04-03 14:56:58.210377728 -0300 +++ src/sage/interfaces/singular.py 2015-12-22 10:55:10.134514020 -0200
@@ -2149,7 +2149,7 @@ def generate_docstring_dictionary(): @@ -2232,7 +2232,7 @@ def generate_docstring_dictionary():
nodes.clear() nodes.clear()
node_names.clear() node_names.clear()

View file

@ -1,38 +0,0 @@
diff -up src/c_lib/SConstruct.orig src/c_lib/SConstruct
--- src/c_lib/SConstruct.orig 2015-04-03 14:44:19.695348682 -0300
+++ src/c_lib/SConstruct 2015-04-03 14:44:30.359349090 -0300
@@ -126,8 +126,8 @@ env['PYV']=platform.python_version().rsp
# The SCons convenience function Split is the only strange thing
# to python programmers. It just makes a list by splitting on
# whitespace without the syntax clutter of lists of strings.
-includes = ['$SAGE_LOCAL/include/', '$SAGE_LOCAL/include/python$PYV/',
- '$SAGE_LOCAL/include/NTL/', 'include']
+includes = ['@@includedir@@', '@@includedir@@/python$PYV/',
+ '@@includedir@@/NTL/', 'include']
cFiles = Split( "convert.c interrupt.c memory.c mpn_pylong.c mpz_pylong.c") + \
Split( "mpz_longlong.c stdsage.c" )
cppFiles = Split( "ZZ_pylong.cpp ntl_wrap.cpp" )
@@ -136,9 +136,22 @@ incFiles = Split( "ccobject.h convert.h
Split( "interrupt.h memory.h mpn_pylong.h mpz_longlong.h" ) + \
Split( "mpz_pylong.h ntl_wrap.h parisage.h stdsage.h ZZ_pylong.h" )
+env.Append(CFLAGS='@@optflags@@')
+env.Append(CXXFLAGS='@@optflags@@')
+env.Append(LINKFLAGS='@@__global_ldflags@@')
+
+libname = "libcsage"
+major = "0"
+shlib_suffix = '.so.' + major
+shlink_flags = [ '@@__global_ldflags@@', '-shared', '-fPIC' ]
+soname = libname + shlib_suffix
+shlink_flags += [ '-Wl,-Bsymbolic', '-Wl,-soname=%s' % soname ]
+
lib = env.SharedLibrary( "csage", [ "src/" + x for x in srcFiles ],
LIBS=['ntl', 'pari', 'gmp', 'python$PYV'],
- LIBPATH=['$SAGE_LOCAL/lib','$SAGE_LOCAL/lib/python$PYV/config/'],
+ LIBPATH=['@@libdir@@','@@libdir@@/python$PYV/config/'],
+ SHLIBSUFFIX=shlib_suffix,
+ SHLINKFLAGS=shlink_flags,
CPPPATH=includes )
env.Install("$SAGE_LOCAL/lib", lib)
env.Install("$SAGE_LOCAL/include/csage", [ os.path.join('include',x) for x in incFiles ])

View file

@ -1,7 +1,7 @@
diff -up src/bin/sage.orig src/bin/sage diff -up src/bin/sage.orig src/bin/sage
--- src/bin/sage.orig 2015-04-03 14:45:35.718351593 -0300 --- src/bin/sage.orig 2015-11-07 11:53:13.984795336 -0200
+++ src/bin/sage 2015-04-03 14:54:09.029371249 -0300 +++ src/bin/sage 2015-11-07 11:53:51.199796761 -0200
@@ -13,11 +13,9 @@ usage() { @@ -13,19 +13,15 @@ usage() {
echo " file.[sage|py|spyx] -- run given .sage, .py or .spyx file" echo " file.[sage|py|spyx] -- run given .sage, .py or .spyx file"
echo " -advanced -- list all command line options" echo " -advanced -- list all command line options"
echo " -c <cmd> -- Evaluates cmd as sage code" echo " -c <cmd> -- Evaluates cmd as sage code"
@ -10,10 +10,10 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -gp [...] -- run Sage's PARI/GP calculator with given arguments" echo " -gp [...] -- run Sage's PARI/GP calculator with given arguments"
echo " -h, -? -- print this help message" echo " -h, -? -- print this help message"
- echo " -i [packages] -- install the given Sage packages" - echo " -i [packages] -- install the given Sage packages"
echo " -pip [...] -- invoke pip, the Python package manager" - echo " -pip [...] -- invoke pip, the Python package manager"
echo " -inotebook [...] -- start the *insecure* Sage notebook (deprecated)" echo " -inotebook [...] -- start the *insecure* Sage notebook (deprecated)"
echo " -maxima [...] -- run Sage's Maxima with given arguments" echo " -maxima [...] -- run Sage's Maxima with given arguments"
@@ -25,7 +23,6 @@ usage() { echo " -mwrank [...] -- run Sage's mwrank with given arguments"
echo " --notebook=[...] -- start the Sage notebook (valid options are" echo " --notebook=[...] -- start the Sage notebook (valid options are"
echo " 'default', 'sagenb', and 'ipython')" echo " 'default', 'sagenb', and 'ipython')"
echo " -n, --notebook -- shortcut for --notebook=default" echo " -n, --notebook -- shortcut for --notebook=default"
@ -21,29 +21,30 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -python [...] -- run the Python interpreter" echo " -python [...] -- run the Python interpreter"
echo " -R [...] -- run Sage's R with given arguments" echo " -R [...] -- run Sage's R with given arguments"
echo " -singular [...] -- run Sage's singular with given arguments" echo " -singular [...] -- run Sage's singular with given arguments"
@@ -41,10 +38,6 @@ usage() { @@ -41,10 +37,6 @@ usage() {
echo " --optional - controls which optional tests are run" echo " --optional - controls which optional tests are run"
echo " --sagenb - test all sagenb files" echo " --sagenb - test all sagenb files"
echo " --help - show all testing options" echo " --help - show all testing options"
- echo " -upgrade [version] -- download, build and install the given version. Here," - echo " -upgrade [version] -- download, build and install the given version. Here,"
- echo " 'version' is a git branch or tag name. Useful values" - echo " 'version' is a git branch or tag name. Useful values"
- echo " are 'master' (the currend development version, this" - echo " are 'master' (the current development version, this"
- echo " is the default) or a version number like '5.13'." - echo " is the default) or a version number like '5.13'."
echo " -v, -version -- print the Sage version" echo " -v, -version -- display Sage version information"
exit 0 exit 0
} }
@@ -63,10 +56,7 @@ usage_advanced() { @@ -63,11 +55,8 @@ usage_advanced() {
echo " -preparse <file.sage> -- preparse file.sage and produce corresponding file.sage.py" echo " -preparse <file.sage> -- preparse file.sage and produce corresponding file.sage.py"
echo " -q -- quiet; start with no banner" echo " -q -- quiet; start with no banner"
echo " -root -- print the Sage root directory" echo " -root -- print the Sage root directory"
- echo " -gthread, -qthread, -q4thread, -wthread, -pylab" - echo " -gthread, -qthread, -q4thread, -wthread, -pylab"
- echo " -- pass the option through to ipython" - echo " -- pass the option through to ipython"
echo " -v, -version -- print the Sage version" echo " -v, -version -- display Sage version information"
echo " -dumpversion -- print Sage version"
- echo " -git-branch -- print the current git branch" - echo " -git-branch -- print the current git branch"
echo echo
#### 1.......................26..................................................78 #### 1.......................26..................................................78
@@ -76,8 +66,6 @@ usage_advanced() { @@ -77,8 +66,6 @@ usage_advanced() {
echo " 'default', 'sagenb', and 'ipython'). See the output" echo " 'default', 'sagenb', and 'ipython'). See the output"
echo " of sage --notebook --help for more details and" echo " of sage --notebook --help for more details and"
echo " examples of how to pass optional arguments" echo " examples of how to pass optional arguments"
@ -52,7 +53,7 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -inotebook [...] -- start the *insecure* Sage notebook (deprecated)" echo " -inotebook [...] -- start the *insecure* Sage notebook (deprecated)"
echo " -n, -notebook [...] -- start the default Sage notebook (options are the" echo " -n, -notebook [...] -- start the default Sage notebook (options are the"
echo " same as for the notebook command in Sage). See the" echo " same as for the notebook command in Sage). See the"
@@ -95,13 +83,9 @@ usage_advanced() { @@ -96,13 +83,9 @@ usage_advanced() {
echo " -gp [...] -- run Sage's PARI/GP calculator with given arguments" echo " -gp [...] -- run Sage's PARI/GP calculator with given arguments"
echo " -ipython [...] -- run Sage's IPython using the default environment (not" echo " -ipython [...] -- run Sage's IPython using the default environment (not"
echo " Sage), passing additional options to IPython" echo " Sage), passing additional options to IPython"
@ -66,7 +67,7 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -maxima [...] -- run Sage's Maxima with given arguments" echo " -maxima [...] -- run Sage's Maxima with given arguments"
echo " -mwrank [...] -- run Sage's mwrank with given arguments" echo " -mwrank [...] -- run Sage's mwrank with given arguments"
echo " -python [...] -- run the Python interpreter" echo " -python [...] -- run the Python interpreter"
@@ -115,44 +99,7 @@ usage_advanced() { @@ -116,45 +99,7 @@ usage_advanced() {
echo echo
#### 1.......................26..................................................78 #### 1.......................26..................................................78
#### |.....................--.|...................................................| #### |.....................--.|...................................................|
@ -90,8 +91,9 @@ diff -up src/bin/sage.orig src/bin/sage
- #echo " -update-build -- build and install all downloaded non-optional Sage packages" - #echo " -update-build -- build and install all downloaded non-optional Sage packages"
- echo " -upgrade [version] -- download, build and install the given version. Here," - echo " -upgrade [version] -- download, build and install the given version. Here,"
- echo " 'version' is a git branch or tag name. Useful values" - echo " 'version' is a git branch or tag name. Useful values"
- echo " are 'master' (the currend development version, this" - echo " are 'master' (the current development version, this"
- echo " is the default) or a version number like '5.13'." - echo " is the default) or a version number like '5.13'."
- echo " -pip [...] -- invoke pip, the Python package manager"
- -
- echo - echo
- #### 1.......................26..................................................78 - #### 1.......................26..................................................78
@ -112,15 +114,7 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -startuptime [module] -- display how long each component of Sage takes to" echo " -startuptime [module] -- display how long each component of Sage takes to"
echo " start up; optionally specify a module to get more" echo " start up; optionally specify a module to get more"
echo " details about that particular module" echo " details about that particular module"
@@ -163,7 +110,6 @@ usage_advanced() { @@ -184,7 +129,6 @@ usage_advanced() {
echo " --verbose - print debugging output during the test"
echo " --optional - controls which optional tests are run"
echo " --randorder[=seed] - randomize order of tests"
- echo " --new - only test files modified since last commit"
echo " --initial - only show the first failure per block"
echo " --debug - drop into PDB after an unexpected error"
echo " --failed - only test files that failed last test"
@@ -182,7 +128,6 @@ usage_advanced() {
echo " -coverage <files> -- give info about doctest coverage of files" echo " -coverage <files> -- give info about doctest coverage of files"
echo " -coverageall -- give summary info about doctest coverage of all" echo " -coverageall -- give summary info about doctest coverage of all"
echo " files in the Sage library" echo " files in the Sage library"
@ -128,12 +122,12 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -search_src <string> -- search through all the Sage library code for string" echo " -search_src <string> -- search through all the Sage library code for string"
echo " -search_doc <string> -- search through the Sage documentation for string" echo " -search_doc <string> -- search through the Sage documentation for string"
echo " -grep <string> -- same as -search_src" echo " -grep <string> -- same as -search_src"
@@ -202,15 +147,6 @@ usage_advanced() { @@ -204,15 +148,6 @@ usage_advanced() {
echo echo
#### 1.......................26..................................................78 #### 1.......................26..................................................78
#### |.....................--.|...................................................| #### |.....................--.|...................................................|
- echo "Making Sage packages or distributions:" - echo "Making Sage packages or distributions:"
- echo " -bdist VER -- build a binary distribution of Sage" - echo " -bdist <tmpdir> -- build a binary distribution of Sage"
- echo " -pkg <dir> -- create Sage package dir.spkg from a given directory" - echo " -pkg <dir> -- create Sage package dir.spkg from a given directory"
- echo " -pkg_nc <dir> -- as -pkg, but do not compress the package" - echo " -pkg_nc <dir> -- as -pkg, but do not compress the package"
- echo " -sdist -- build a source distribution of Sage" - echo " -sdist -- build a source distribution of Sage"
@ -144,7 +138,7 @@ diff -up src/bin/sage.orig src/bin/sage
echo "Valgrind memory debugging:" echo "Valgrind memory debugging:"
echo " -cachegrind -- run Sage using Valgrind's cachegrind tool. The log" echo " -cachegrind -- run Sage using Valgrind's cachegrind tool. The log"
echo " files are named sage-cachegrind.PID can be found in" echo " files are named sage-cachegrind.PID can be found in"
@@ -224,9 +160,6 @@ usage_advanced() { @@ -226,9 +161,6 @@ usage_advanced() {
echo " -memcheck -- run Sage using Valgrind's memcheck tool. The log" echo " -memcheck -- run Sage using Valgrind's memcheck tool. The log"
echo " files are named sage-memcheck.PID can be found in" echo " files are named sage-memcheck.PID can be found in"
echo " $DOT_SAGE" echo " $DOT_SAGE"
@ -154,7 +148,17 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -valgrind -- this is an alias for -memcheck" echo " -valgrind -- this is an alias for -memcheck"
echo echo
echo "You can also use -- before a long option, e.g., 'sage --optional'." echo "You can also use -- before a long option, e.g., 'sage --optional'."
@@ -246,34 +179,6 @@ if [ "$1" = '--nodotsage' ]; then @@ -236,9 +168,6 @@ usage_advanced() {
exit 0
}
-# Check for '--nodotsage' before sourcing sage-env; otherwise sage-env
-# will already have set some environment variables with the old
-# setting for DOT_SAGE.
if [ "$1" = '--nodotsage' ]; then
export DOT_SAGE=`mktemp -d ${TMPDIR:-/tmp}/dotsageXXXXXX`
shift
@@ -248,34 +177,6 @@ if [ "$1" = '--nodotsage' ]; then
exit $status exit $status
fi fi
@ -189,10 +193,11 @@ diff -up src/bin/sage.orig src/bin/sage
if [ $# -gt 0 ]; then if [ $# -gt 0 ]; then
if [ "$1" = '-h' -o "$1" = '-?' -o "$1" = '-help' -o "$1" = '--help' ]; then if [ "$1" = '-h' -o "$1" = '-?' -o "$1" = '-help' -o "$1" = '--help' ]; then
usage usage
@@ -286,24 +191,11 @@ fi @@ -287,25 +188,11 @@ fi
# Prepare for running Sage, either interactively or non-interactively. # Prepare for running Sage, either interactively or non-interactively.
sage_setup() { sage_setup() {
# Check that we're not in a source tarball which hasn't been built yet (#13561). - # Check that we're not in a source tarball which hasn't been built yet (#13561).
- if [ ! -d "$SAGE_LOCAL/lib/python/site-packages/sage" ]; then - if [ ! -d "$SAGE_LOCAL/lib/python/site-packages/sage" ]; then
- echo >&2 '************************************************************************' - echo >&2 '************************************************************************'
- echo >&2 'It seems that you are attempting to run Sage from an unpacked source' - echo >&2 'It seems that you are attempting to run Sage from an unpacked source'
@ -214,11 +219,10 @@ diff -up src/bin/sage.orig src/bin/sage
if [ ! -d "$IPYTHONDIR" ]; then if [ ! -d "$IPYTHONDIR" ]; then
# make sure that $DOT_SAGE exists so that ipython will happily # make sure that $DOT_SAGE exists so that ipython will happily
# create its config directories there. If DOT_SAGE doesn't # create its config directories there. If DOT_SAGE doesn't
@@ -313,21 +205,6 @@ sage_setup() { @@ -316,20 +203,6 @@ sage_setup() {
sage-cleaner &>/dev/null &
} }
-
-# Check to see if the whole Sage install tree has moved. If so, -# Check to see if the whole Sage install tree has moved. If so,
-# change various hardcoded paths. Skip this if we don't have write -# change various hardcoded paths. Skip this if we don't have write
-# access to $SAGE_LOCAL (e.g. when running as a different user) or -# access to $SAGE_LOCAL (e.g. when running as a different user) or
@ -236,7 +240,7 @@ diff -up src/bin/sage.orig src/bin/sage
# Start an interactive Sage session, this function never returns. # Start an interactive Sage session, this function never returns.
interactive_sage() { interactive_sage() {
sage_setup sage_setup
@@ -389,7 +266,7 @@ fi @@ -396,7 +269,7 @@ fi
if [ "$1" = '-singular' -o "$1" = '--singular' ]; then if [ "$1" = '-singular' -o "$1" = '--singular' ]; then
shift shift
@ -245,7 +249,7 @@ diff -up src/bin/sage.orig src/bin/sage
fi fi
if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then
@@ -417,16 +294,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ] @@ -424,16 +297,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ]
exec ecl "$@" exec ecl "$@"
fi fi
@ -262,19 +266,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
shift shift
exec maxima "$@" exec maxima "$@"
@@ -447,11 +314,6 @@ if [ "$1" = '-scons' -o "$1" = '--scons' @@ -474,16 +337,6 @@ if [ "$1" = '-ipython' -o "$1" = '--ipyt
exec scons "$@"
fi
-if [ "$1" = '-pip' -o "$1" = '--pip' ]; then
- shift
- exec pip "$@"
-fi
-
if [ "$1" = '-python' -o "$1" = '--python' ]; then
shift
exec python "$@"
@@ -467,16 +329,6 @@ if [ "$1" = '-ipython' -o "$1" = '--ipyt
exec ipython "$@" exec ipython "$@"
fi fi
@ -291,7 +283,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = '-sh' -o "$1" = '--sh' ]; then if [ "$1" = '-sh' -o "$1" = '--sh' ]; then
# AUTHORS: # AUTHORS:
# - Carl Witty and William Stein: initial version # - Carl Witty and William Stein: initial version
@@ -596,20 +448,6 @@ EOF @@ -603,20 +456,6 @@ EOF
fi fi
##################################################################### #####################################################################
@ -312,19 +304,19 @@ diff -up src/bin/sage.orig src/bin/sage
# File conversion # File conversion
##################################################################### #####################################################################
@@ -627,11 +465,6 @@ fi @@ -634,11 +473,6 @@ fi
# Run Sage's versions of the standard Algebra/Geometry etc. software # Run Sage's versions of the standard Algebra/Geometry etc. software
##################################################################### #####################################################################
-build_sage() { -build_sage() {
- maybe_sage_location - maybe_sage_location
- sage-build "$@" || exit $? - ( cd "$SAGE_SRC" && $MAKE ) || exit $?
-} -}
- -
if [[ "$1" =~ ^--notebook=.* || "$1" =~ ^-n=.* || "$1" =~ ^-notebook=.* ]] ; then if [[ "$1" =~ ^--notebook=.* || "$1" =~ ^-n=.* || "$1" =~ ^-notebook=.* ]] ; then
sage-cleaner &>/dev/null & sage-cleaner &>/dev/null &
exec sage-notebook "$@" exec sage-notebook "$@"
@@ -642,13 +475,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not @@ -649,13 +483,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not
exec sage-notebook "$@" exec sage-notebook "$@"
fi fi
@ -338,19 +330,17 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then
shift shift
sage-cleaner &>/dev/null & sage-cleaner &>/dev/null &
@@ -667,40 +493,19 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep @@ -674,31 +501,12 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep
exit 0 exit 0
fi fi
-if [ "$1" = '-b' ]; then -if [ "$1" = '-b' ]; then
- shift - time build_sage
- time build_sage "$@"
- exit $? - exit $?
-fi -fi
- -
-if [ "$1" = '-br' -o "$1" = "--br" ]; then -if [ "$1" = '-br' -o "$1" = "--br" ]; then
- shift - build_sage
- build_sage "$@"
- interactive_sage - interactive_sage
-fi -fi
- -
@ -360,8 +350,8 @@ diff -up src/bin/sage.orig src/bin/sage
fi fi
-if [ "$1" = '-ba' -o "$1" = '-ba-force' -o "$1" = '--ba-force' ]; then -if [ "$1" = '-ba' -o "$1" = '-ba-force' -o "$1" = '--ba-force' ]; then
- shift - ( cd "$SAGE_SRC" && make clean )
- build_sage -b "$@" - build_sage
- exit $? - exit $?
-fi -fi
- -
@ -373,15 +363,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ ! -f "$DOT_SAGE"/init.sage ]; then if [ ! -f "$DOT_SAGE"/init.sage ]; then
echo >&2 "init.sage does not exist ... creating" echo >&2 "init.sage does not exist ... creating"
touch "$DOT_SAGE"/init.sage touch "$DOT_SAGE"/init.sage
fi @@ -715,17 +523,6 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1"
SAGE_BANNER="no"
sage_setup
- if [ "$1" = '-tp' -o "$1" = '-btp' ]; then
+ if [ "$1" = '-tp' ]; then
shift
exec sage-runtests -p "$@"
else
@@ -709,16 +514,6 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1"
fi fi
fi fi
@ -392,13 +374,14 @@ diff -up src/bin/sage.orig src/bin/sage
- shift - shift
- SAGE_BANNER="no" - SAGE_BANNER="no"
- sage_setup - sage_setup
- export PYTHONIOENCODING="utf-8" # Fix encoding for doctests
- exec sage-runtests --new "$@" - exec sage-runtests --new "$@"
-fi -fi
- -
if [ "$1" = '-testall' -o "$1" = "--testall" ]; then if [ "$1" = '-testall' -o "$1" = "--testall" ]; then
shift shift
SAGE_BANNER="no" SAGE_BANNER="no"
@@ -734,136 +529,6 @@ if [ "$1" = '-c' ]; then @@ -742,140 +539,6 @@ if [ "$1" = '-c' ]; then
exec sage-eval "$@" exec sage-eval "$@"
fi fi
@ -432,7 +415,7 @@ diff -up src/bin/sage.orig src/bin/sage
- PKG_NAME=`echo "$PKG" | sed -e "s/\.spkg$//"` - PKG_NAME=`echo "$PKG" | sed -e "s/\.spkg$//"`
- PKG_NAME=`basename "$PKG_NAME"` - PKG_NAME=`basename "$PKG_NAME"`
- -
- "$SAGE_ROOT"/build/pipestatus \ - "$SAGE_ROOT"/build/make/pipestatus \
- "sage-spkg $OPTINFO $OPTF $OPTS $OPTC '$PKG' 2>&1" \ - "sage-spkg $OPTINFO $OPTF $OPTS $OPTC '$PKG' 2>&1" \
- "(trap '' SIGINT; tee -a '$SAGE_ROOT/logs/install.log' '$SAGE_LOGS/$PKG_NAME.log')" - "(trap '' SIGINT; tee -a '$SAGE_ROOT/logs/install.log' '$SAGE_LOGS/$PKG_NAME.log')"
- # Do not try to install further packages if one failed - # Do not try to install further packages if one failed
@ -452,19 +435,23 @@ diff -up src/bin/sage.orig src/bin/sage
-} -}
- -
-if [ "$1" = '-optional' -o "$1" = "--optional" ]; then -if [ "$1" = '-optional' -o "$1" = "--optional" ]; then
- exec sage-list-packages optional - shift
- exec sage-list-packages optional $@
-fi -fi
- -
-if [ "$1" = '-experimental' -o "$1" = "--experimental" ]; then -if [ "$1" = '-experimental' -o "$1" = "--experimental" ]; then
- exec sage-list-packages experimental - shift
- exec sage-list-packages experimental $@
-fi -fi
- -
-if [ "$1" = '-standard' -o "$1" = "--standard" ]; then -if [ "$1" = '-standard' -o "$1" = "--standard" ]; then
- exec sage-list-packages standard - shift
- exec sage-list-packages standard $@
-fi -fi
- -
-if [ "$1" = '-installed' -o "$1" = "--installed" ]; then -if [ "$1" = '-installed' -o "$1" = "--installed" ]; then
- exec sage-list-packages installed - shift
- exec sage-list-packages installed $@
-fi -fi
- -
-if [ "$1" = '-i' ]; then -if [ "$1" = '-i' ]; then
@ -535,7 +522,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
shift shift
sage_setup sage_setup
@@ -912,26 +577,10 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca @@ -924,31 +587,11 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca
exec sage-callgrind "$@" exec sage-callgrind "$@"
fi fi
@ -560,12 +547,17 @@ diff -up src/bin/sage.orig src/bin/sage
-fi -fi
- -
if [ $# -ge 1 ]; then if [ $# -ge 1 ]; then
T=`echo "$1" | sed -e "s/.*\.//"` - T=`echo "$1" | sed -e "s/.*\.//"`
if [ "$T" = "spkg" ]; then - if [ "$T" = "spkg" ]; then
- install "$@"
- fi
SAGE_BANNER="no"
sage_setup
unset TERM # See Trac #12263
diff -up src/bin/sage-runtests.orig src/bin/sage-runtests diff -up src/bin/sage-runtests.orig src/bin/sage-runtests
--- src/bin/sage-runtests.orig 2015-04-03 14:45:48.439352080 -0300 --- src/bin/sage-runtests.orig 2015-11-07 11:53:13.991795336 -0200
+++ src/bin/sage-runtests 2015-04-03 14:54:20.773371699 -0300 +++ src/bin/sage-runtests 2015-11-07 11:53:18.458795507 -0200
@@ -54,10 +54,6 @@ if __name__ == "__main__": @@ -55,10 +55,6 @@ if __name__ == "__main__":
help="run doctests using Valgrind's cachegrind tool. The log " help="run doctests using Valgrind's cachegrind tool. The log "
"files are named sage-cachegrind.PID and can be found in " + "files are named sage-cachegrind.PID and can be found in " +
os.path.join(os.environ["DOT_SAGE"], "valgrind")) os.path.join(os.environ["DOT_SAGE"], "valgrind"))
@ -577,8 +569,8 @@ diff -up src/bin/sage-runtests.orig src/bin/sage-runtests
parser.add_option("-f", "--failed", action="store_true", default=False, parser.add_option("-f", "--failed", action="store_true", default=False,
help="doctest only those files that failed in the previous run") help="doctest only those files that failed in the previous run")
diff -up src/bin/sage-valgrind.orig src/bin/sage-valgrind diff -up src/bin/sage-valgrind.orig src/bin/sage-valgrind
--- src/bin/sage-valgrind.orig 2015-04-03 14:45:55.318352343 -0300 --- src/bin/sage-valgrind.orig 2015-11-07 11:53:13.997795336 -0200
+++ src/bin/sage-valgrind 2015-04-03 14:54:41.525372494 -0300 +++ src/bin/sage-valgrind 2015-11-07 11:53:18.458795507 -0200
@@ -1,16 +1,6 @@ @@ -1,16 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash

View file

@ -1,7 +1,7 @@
diff -up src/sage/env.py.orig src/sage/env.py diff -up src/sage/env.py.orig src/sage/env.py
--- src/sage/env.py.orig 2014-08-12 14:24:55.730988886 -0300 --- src/sage/env.py.orig 2015-10-11 18:09:31.532841862 -0300
+++ src/sage/env.py 2014-08-12 14:25:03.802989196 -0300 +++ src/sage/env.py 2015-10-11 18:09:40.426842203 -0300
@@ -86,7 +86,7 @@ _add_variable_or_fallback('HOSTNAME', @@ -87,7 +87,7 @@ _add_variable_or_fallback('HOSTNAME',
_add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid()) _add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid())
# bunch of sage directories and files # bunch of sage directories and files
@ -9,8 +9,8 @@ diff -up src/sage/env.py.orig src/sage/env.py
+_add_variable_or_fallback('SAGE_ROOT', '@@SAGE_ROOT@@') +_add_variable_or_fallback('SAGE_ROOT', '@@SAGE_ROOT@@')
_add_variable_or_fallback('SAGE_LOCAL', opj('$SAGE_ROOT', 'local')) _add_variable_or_fallback('SAGE_LOCAL', opj('$SAGE_ROOT', 'local'))
_add_variable_or_fallback('SAGE_ETC', opj('$SAGE_LOCAL', 'etc')) _add_variable_or_fallback('SAGE_ETC', opj('$SAGE_LOCAL', 'etc'))
_add_variable_or_fallback('SAGE_SHARE', opj('$SAGE_LOCAL', 'share')) _add_variable_or_fallback('SAGE_INC', opj('$SAGE_LOCAL', 'include'))
@@ -98,7 +98,7 @@ _add_variable_or_fallback('SAGE_LIB', @@ -102,7 +102,7 @@ _add_variable_or_fallback('SAGE_CYTHONIZ
_add_variable_or_fallback('SAGE_EXTCODE', opj('$SAGE_SHARE', 'sage', 'ext')) _add_variable_or_fallback('SAGE_EXTCODE', opj('$SAGE_SHARE', 'sage', 'ext'))
_add_variable_or_fallback('SAGE_LOGS', opj('$SAGE_ROOT', 'logs', 'pkgs')) _add_variable_or_fallback('SAGE_LOGS', opj('$SAGE_ROOT', 'logs', 'pkgs'))
_add_variable_or_fallback('SAGE_SPKG_INST', opj('$SAGE_LOCAL', 'var', 'lib', 'sage', 'installed')) _add_variable_or_fallback('SAGE_SPKG_INST', opj('$SAGE_LOCAL', 'var', 'lib', 'sage', 'installed'))
@ -18,4 +18,4 @@ diff -up src/sage/env.py.orig src/sage/env.py
+_add_variable_or_fallback('SAGE_DOC', '@@SAGE_DOC@@') +_add_variable_or_fallback('SAGE_DOC', '@@SAGE_DOC@@')
_add_variable_or_fallback('DOT_SAGE', opj(os.environ.get('HOME','$SAGE_ROOT'), '.sage')) _add_variable_or_fallback('DOT_SAGE', opj(os.environ.get('HOME','$SAGE_ROOT'), '.sage'))
_add_variable_or_fallback('SAGE_DOT_GIT', opj('$SAGE_ROOT', '.git')) _add_variable_or_fallback('SAGE_DOT_GIT', opj('$SAGE_ROOT', '.git'))
_add_variable_or_fallback('SAGE_DISTFILES', opj('$SAGE_ROOT', 'upstream'))

View file

@ -1,5 +1,7 @@
%global __provides_exclude_from .*/site-packages/.*\\.so %global __provides_exclude_from .*/site-packages/.*\\.so
%bcond_without bundled_pari
# for faster full rpm test builds # for faster full rpm test builds
%bcond_without docs %bcond_without docs
@ -21,9 +23,12 @@
%global SAGE_TIMEOUT_LONG 180 %global SAGE_TIMEOUT_LONG 180
%global conway_polynomials_pkg conway_polynomials-0.4 %global conway_polynomials_pkg conway_polynomials-0.4
%global elliptic_curves_pkg elliptic_curves-0.7 %global elliptic_curves_pkg elliptic_curves-0.8
%global flintqs_pkg flintqs-20070817 %global flintqs_pkg flintqs-20070817
%global graphs_pkg graphs-20130920 %global graphs_pkg graphs-20130920
%if %{with bundled_pari}
%global pari_pkg pari-2.8-1637-g489005a
%endif
%global pexpect_pkg pexpect-2.0 %global pexpect_pkg pexpect-2.0
%global polytopes_db_pkg polytopes_db-20120220 %global polytopes_db_pkg polytopes_db-20120220
%global rubiks_pkg rubiks-20070912 %global rubiks_pkg rubiks-20070912
@ -37,12 +42,13 @@
%global SAGE_SHARE %{_datadir}/sagemath %global SAGE_SHARE %{_datadir}/sagemath
%global SAGE_ETC %{SAGE_SHARE}/etc %global SAGE_ETC %{SAGE_SHARE}/etc
%global SAGE_PYTHONPATH %{SAGE_ROOT}/site-packages %global SAGE_PYTHONPATH %{SAGE_ROOT}/site-packages
%global SAGE_SPKG_INST %{SAGE_LOCAL}/var/lib/sage/installed
Name: sagemath Name: sagemath
Group: Applications/Engineering Group: Applications/Engineering
Summary: A free open-source mathematics software system Summary: A free open-source mathematics software system
Version: 6.5 Version: 6.8
Release: 14%{?dist} Release: 1%{?dist}
# The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file # The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
# Additionally, every $files section has a comment with the license name # Additionally, every $files section has a comment with the license name
# before files with that license # before files with that license
@ -52,15 +58,6 @@ Source0: http://boxen.math.washington.edu/home/%{name}/sage-mirror/src/sage-%{ve
Source1: gprc.expect Source1: gprc.expect
Source2: makecmds.sty Source2: makecmds.sty
# 1. scons ignores most environment variables
# 2. scons 2.2* does not have soname support (expected for scons 2.3*)
# This patch adds some regex substition templates for CFLAGS, etc, and
# minor adaptation from full scons patch at:
# http://scons.tigris.org/nonav/issues/showattachment.cgi/902/soname_func.py
# Discussed at:
# http://scons.tigris.org/issues/show_bug.cgi?id=2869
Patch0: %{name}-scons.patch
# Upstream uses mpir not gmp, but the rpm package is tailored to use gmp # Upstream uses mpir not gmp, but the rpm package is tailored to use gmp
Patch1: %{name}-gmp.patch Patch1: %{name}-gmp.patch
@ -123,20 +120,19 @@ Patch15: %{name}-nauty.patch
# http://www-gap.mcs.st-and.ac.uk/Packages/hap.html # http://www-gap.mcs.st-and.ac.uk/Packages/hap.html
Patch16: %{name}-gap-hap.patch Patch16: %{name}-gap-hap.patch
# enable lrcalc # correct path to Lfunction include
Patch17: %{name}-lrcalc.patch Patch17: %{name}-lcalc.patch
# enable cbc # avoid assertion in coin backend
Patch18: %{name}-cbc.patch Patch18: %{name}-cbc.patch
# Use system gap directories # Use system gap directories
Patch19: %{name}-libgap.patch Patch19: %{name}-libgap.patch
# enable fes # Build fes
Patch20: %{name}-fes.patch Patch20: %{name}-fes-build.patch
# Disable fes
# enable cryptominisat Patch21: %{name}-fes.patch
Patch21: %{name}-cryptominisat.patch
# Side effect of using distro packages # Side effect of using distro packages
# https://bugzilla.redhat.com/show_bug.cgi?id=974769 # https://bugzilla.redhat.com/show_bug.cgi?id=974769
@ -145,24 +141,22 @@ Patch22: %{name}-sympy.patch
# Fix a name clash with NTL # Fix a name clash with NTL
Patch23: %{name}-ntl.patch Patch23: %{name}-ntl.patch
# Temporary patch: http://trac.sagemath.org/ticket/17657
Patch24: %{name}-parallel.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1194941
Patch25: %{name}-ipython3.patch
# Fix a changed interface in NTL 9.x # Fix a changed interface in NTL 9.x
Patch26: %{name}-ntl9.patch Patch24: %{name}-ntl9.patch
# Correct unable to start QEPCAD within sage # Correct unable to start QEPCAD within sage
# https://bugzilla.redhat.com/show_bug.cgi?id=1243590 # https://bugzilla.redhat.com/show_bug.cgi?id=1243590
Patch27: %{name}-qepcad.patch Patch25: %{name}-qepcad.patch
# Temporary correction for invalid conversion from # Temporary correction for invalid conversion from
# 'int' to 'polybori::COrderEnums::ordercodes' # 'int' to 'polybori::COrderEnums::ordercodes'
Patch28: %{name}-polybori.patch Patch26: %{name}-polybori.patch
# Correct path to arb headers
Patch27: %{name}-arb.patch
BuildRequires: 4ti2 BuildRequires: 4ti2
BuildRequires: arb-devel
BuildRequires: atlas-devel BuildRequires: atlas-devel
BuildRequires: cddlib-tools BuildRequires: cddlib-tools
BuildRequires: cliquer-devel BuildRequires: cliquer-devel
@ -209,8 +203,11 @@ BuildRequires: mpfi-devel
BuildRequires: ntl-devel BuildRequires: ntl-devel
BuildRequires: numpy BuildRequires: numpy
BuildRequires: palp BuildRequires: palp
%if %{without bundled_pari}
BuildRequires: pari-devel BuildRequires: pari-devel
BuildRequires: pari-gp BuildRequires: pari-gp
%endif
BuildRequires: planarity-devel
BuildRequires: ppl-devel BuildRequires: ppl-devel
BuildRequires: pynac-devel BuildRequires: pynac-devel
BuildRequires: python2-devel BuildRequires: python2-devel
@ -229,12 +226,13 @@ BuildRequires: R
BuildRequires: ratpoints-devel BuildRequires: ratpoints-devel
BuildRequires: readline-devel BuildRequires: readline-devel
BuildRequires: rpy BuildRequires: rpy
BuildRequires: rw-devel
BuildRequires: scons BuildRequires: scons
BuildRequires: Singular-devel BuildRequires: Singular-devel
BuildRequires: stix-math-fonts BuildRequires: stix-math-fonts
BuildRequires: symmetrica-devel
BuildRequires: sympow BuildRequires: sympow
BuildRequires: sympy BuildRequires: sympy
BuildRequires: symmetrica-devel
BuildRequires: texlive BuildRequires: texlive
# For _jsdir macro # For _jsdir macro
BuildRequires: web-assets-devel BuildRequires: web-assets-devel
@ -284,7 +282,9 @@ Requires: R
Requires: rpy Requires: rpy
Requires: %{name}-core Requires: %{name}-core
Requires: %{name}-data Requires: %{name}-data
%if %{with docs}
Requires: %{name}-doc-en Requires: %{name}-doc-en
%endif
Requires: %{name}-notebook Requires: %{name}-notebook
Requires: %{name}-rubiks Requires: %{name}-rubiks
Requires: %{name}-sagetex Requires: %{name}-sagetex
@ -306,6 +306,7 @@ packages into a common Python-based interface.
Summary: Open Source Mathematics Software Summary: Open Source Mathematics Software
Group: Applications/Engineering Group: Applications/Engineering
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-devel < 6.8-1
%description core %description core
This package contains the core sagemath python modules. This package contains the core sagemath python modules.
@ -389,16 +390,6 @@ you can use sage.geometry.lattice_polytope module, which relies on PALP for
some of its functionality. To get access to the databases of this package, use some of its functionality. To get access to the databases of this package, use
ReflexivePolytope and ReflexivePolytopes commands. ReflexivePolytope and ReflexivePolytopes commands.
#------------------------------------------------------------------------
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package contains the header files and development documentation
for %{name}.
%if %{with docs} %if %{with docs}
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%package doc %package doc
@ -575,6 +566,18 @@ pushd build/pkgs/graphs
mv %{graphs_pkg} src mv %{graphs_pkg} src
popd popd
%if %{with bundled_pari}
pushd build/pkgs/pari
tar zxf ../../../upstream/%{pari_pkg}.tar.gz
mv %{pari_pkg} src
pushd src
for diff in ../patches/*.patch; do
patch -p1 < $diff
done
popd
popd
%endif
pushd build/pkgs/pexpect pushd build/pkgs/pexpect
tar jxf ../../../upstream/%{pexpect_pkg}.tar.bz2 tar jxf ../../../upstream/%{pexpect_pkg}.tar.bz2
mv %{pexpect_pkg} src mv %{pexpect_pkg} src
@ -614,7 +617,6 @@ pushd build/pkgs/sagetex
mv %{sagetex_pkg} src mv %{sagetex_pkg} src
popd popd
%patch0
%patch1 %patch1
%patch2 %patch2
%patch3 %patch3
@ -622,11 +624,14 @@ popd
%patch5 %patch5
%patch6 %patch6
%patch7 %patch7
%patch8 %patch8
%patch9 %patch9
%patch10 %patch10
%if %{without bundled_pari}
%patch11 %patch11
%endif
%patch12 %patch12
%patch13 %patch13
%patch14 %patch14
@ -638,18 +643,16 @@ popd
%if %{with fes} %if %{with fes}
%patch20 %patch20
%else
%patch21
%endif %endif
%patch21
%patch22 %patch22
%patch23 %patch23
%patch24 %patch24
%if 0%{fedora} > 22
%patch25 %patch25
%endif
%patch26 %patch26
%patch27 %patch27
%patch28
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \ sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
-e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \ -e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
@ -705,30 +708,52 @@ export PATH=%{buildroot}%{_bindir}:$PATH
export PYTHONPATH=%{buildroot}%{python_sitearch}:$PYTHONPATH export PYTHONPATH=%{buildroot}%{python_sitearch}:$PYTHONPATH
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd src/c_lib # Save and update environment to generate bundled interfaces
# scons ignores most environment variables save_PATH=$PATH
# and does not have soname support save_LOCAL=$SAGE_LOCAL
ldflags=$(sed 's/[[:blank:]]*$//' <<< "%{__global_ldflags}") export PATH=%{_builddir}/bin:$PATH
sed -e 's|@@includedir@@|%{_includedir}|g' \ export SAGE_LOCAL=%{_builddir}
-e 's|@@libdir@@|%{_libdir}|g' \
-e 's|@@optflags@@|%{optflags}|g' \ %if %{with bundled_pari}
-e "s|@@__global_ldflags@@|$ldflags|g" \ # Build bundled pari-2.8
-i SConstruct pushd build/pkgs/pari/src
# force building ntl_wrap.cpp with gcc otherwise other ./Configure --prefix=%{_builddir} \
# modules will not find mangled symbols. --without-readline --with-gmp \
CXX=gcc UNAME=Linux SAGE64=auto scons --kernel=gmp --graphic=none
ln -s libcsage.so.0 libcsage.so sed -i 's|%{_builddir}|%{_prefix}|g' Olinux-*/paricfg.h
popd make %{?_smp_mflags} gp
pushd src/sage/libs/mpmath make install DESTDIR=""
dos2unix ext_impl.pxd ext_libmp.pyx ext_main.pxd ext_main.pyx cp -p src/language/anal.h %{_builddir}/include/pari/anal.h
popd popd
%endif
# Generate pari interface
pushd src pushd src
python ./setup.py build %__python2 -c "from sage_setup.autogen.interpreters import rebuild; rebuild('sage/ext/interpreters')"
%__python2 -c "from sage_setup.autogen.pari import rebuild; rebuild()"
popd popd
%if %{with bundled_pari}
# Make temporary headers and static library visible
sed -i 's|\(^ include_directories = \[SAGE_INC,\)|\1 "%{_builddir}/include",|' \
src/sage/env.py
sed -i 's|\(^extra_link_args = \[\) \]|\1"-L%{_builddir}/lib"\]|' \
src/setup.py
%endif
# Restore environment used to generate bundled interfaces
export PATH=$save_PATH
export SAGE_LOCAL=$save_LOCAL
%if 1
pushd src
%__python2 -u ./setup.py build
popd
%endif
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd build/pkgs/sagenb/src/%{sagenb_pkg} pushd build/pkgs/sagenb/src/%{sagenb_pkg}
python ./setup.py build %__python2 ./setup.py build
popd popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
@ -740,13 +765,17 @@ pushd build/pkgs/rubiks/src
make %{?_smp_mflags} CC="gcc -fPIC" CXX="g++ -fPIC" CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" make %{?_smp_mflags} CC="gcc -fPIC" CXX="g++ -fPIC" CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
popd popd
%if 1
# Remove buildroot reference from cython comments # Remove buildroot reference from cython comments
perl -pi -e 's|%{buildroot}||g;' `find src/build/cythonized -type f` perl -pi -e 's|%{buildroot}||g;' `find src/build/cythonized -type f`
# Try hard to remove buildroot from binaries # Try hard to remove buildroot from binaries
rm -f `grep -lr "%{buildroot}" src/build/lib.linux-*/` rm -f `grep -lr "%{buildroot}" src/build/lib.linux-*/`
rm -f `grep -lr "%{buildroot}" src/build/temp.linux-*/`
pushd src pushd src
python ./setup.py build %__python2 ./setup.py build
popd popd
%endif
# last build command # last build command
rm -fr $DOT_SAGE rm -fr $DOT_SAGE
@ -756,12 +785,17 @@ rm -fr $DOT_SAGE
export CC=%{__cc} export CC=%{__cc}
export SAGE_ROOT=%{buildroot}%{SAGE_ROOT} export SAGE_ROOT=%{buildroot}%{SAGE_ROOT}
export SAGE_LOCAL=%{buildroot}%{SAGE_LOCAL} export SAGE_LOCAL=%{buildroot}%{SAGE_LOCAL}
export SAGE_SRC=%{buildroot}%{SAGE_SRC} # Avoid buildroot in gcc command line (use _builddir instead)
export SAGE_SRC="$PWD/src"
#export SAGE_SRC=#%#{buildroot}#%#{SAGE_SRC}
export SAGE_SHARE=%{buildroot}%{SAGE_SHARE} export SAGE_SHARE=%{buildroot}%{SAGE_SHARE}
export SAGE_ETC=%{buildroot}%{SAGE_ETC} export SAGE_ETC=%{buildroot}%{SAGE_ETC}
export SAGE_EXTCODE=%{buildroot}%{SAGE_ETC}
export SAGE_DOC=%{buildroot}%{SAGE_DOC} export SAGE_DOC=%{buildroot}%{SAGE_DOC}
export SAGE_PYTHONPATH=%{buildroot}%{SAGE_PYTHONPATH} export SAGE_PYTHONPATH=%{buildroot}%{SAGE_PYTHONPATH}
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH %if %{with bundled_pari}
export LD_LIBRARY_PATH=%{_builddir}/lib:$LD_LIBRARY_PATH
%endif
export DESTDIR=%{buildroot} export DESTDIR=%{buildroot}
export DOT_SAGE=/tmp/sage$$ export DOT_SAGE=/tmp/sage$$
mkdir -p $DOT_SAGE/tmp mkdir -p $DOT_SAGE/tmp
@ -774,17 +808,15 @@ mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_libdir}
mkdir -p $SAGE_PYTHONPATH mkdir -p $SAGE_PYTHONPATH
rm -fr $SAGE_LOCAL/{include,lib,share,notebook} rm -fr $SAGE_LOCAL/{include,lib,share,notebook}
mkdir -p $SAGE_SHARE $SAGE_DOC $SAGE_LOCAL/bin $SAGE_SRC mkdir -p $SAGE_SHARE $SAGE_DOC $SAGE_LOCAL/bin %{buildroot}%{SAGE_SRC}
ln -sf $PWD/src/sage $SAGE_SRC/sage ln -sf $PWD/src/sage %{buildroot}%{SAGE_SRC}/sage
ln -sf %{_libdir} $SAGE_LOCAL/lib ln -sf %{_libdir} $SAGE_LOCAL/lib
ln -sf %{_includedir} $SAGE_LOCAL/include ln -sf %{_includedir} $SAGE_LOCAL/include
ln -sf %{_datadir} $SAGE_LOCAL/share ln -sf %{_datadir} $SAGE_LOCAL/share
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd src pushd src
python setup.py install --root=%{buildroot} %__python2 -u setup.py install --root=%{buildroot}
cp -fa c_lib/libcsage.so.0 %{buildroot}%{_libdir}
ln -sf libcsage.so.0 %{buildroot}%{_libdir}/libcsage.so
%if %{with docs} %if %{with docs}
# install documentation sources # install documentation sources
rm -fr $SAGE_DOC/{common,en,fr} rm -fr $SAGE_DOC/{common,en,fr}
@ -792,10 +824,17 @@ pushd src
%endif %endif
popd popd
%if %{with bundled_pari}
# Revert change to make temporary headers and static library visible
# Making it search for the installed sagemath path
sed -i 's|\(^ include_directories = \[SAGE_INC,\).*|\1|' \
%{buildroot}%{SAGE_SRC}/sage/env.py
%endif
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd build/pkgs/sagenb/src/%{sagenb_pkg} pushd build/pkgs/sagenb/src/%{sagenb_pkg}
rm -f %{buildroot}%{python_sitearch}/sagenb/data/sage3d/sage3d rm -f %{buildroot}%{python_sitearch}/sagenb/data/sage3d/sage3d
python setup.py install --root=%{buildroot} --install-purelib=%{python_sitearch} %__python2 setup.py install --root=%{buildroot} --install-purelib=%{python_sitearch}
# jsmol # jsmol
ln -sf %{_jsdir}/jsmol $SAGE_SHARE/jsmol ln -sf %{_jsdir}/jsmol $SAGE_SHARE/jsmol
# sage3d # sage3d
@ -818,7 +857,10 @@ pushd src/bin
cp -fa sage-* $SAGE_LOCAL/bin cp -fa sage-* $SAGE_LOCAL/bin
pushd $SAGE_LOCAL/bin pushd $SAGE_LOCAL/bin
ln -sf %{_bindir}/python sage.bin ln -sf %{_bindir}/python sage.bin
ln -sf %{_bindir}/python python
%if %{without bundled_pari}
ln -sf %{_bindir}/gp sage_pari ln -sf %{_bindir}/gp sage_pari
%endif
ln -sf %{_bindir}/gap gap_stamp ln -sf %{_bindir}/gap gap_stamp
ln -sf %{_bindir}/gmp-ecm ecm ln -sf %{_bindir}/gmp-ecm ecm
popd popd
@ -908,12 +950,11 @@ pushd src/ext
mkdir -p $SAGE_ETC mkdir -p $SAGE_ETC
for dir in \ for dir in \
gap \ gap \
graphs \
images \ images \
magma \ magma \
maxima \
mwrank \ mwrank \
singular \ notebook-ipython; do
sobj; do
COUNT=`find $dir -type f | wc -l ` COUNT=`find $dir -type f | wc -l `
if [ $COUNT -gt 0 ]; then if [ $COUNT -gt 0 ]; then
cp -far $dir $SAGE_ETC cp -far $dir $SAGE_ETC
@ -937,7 +978,7 @@ popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd build/pkgs/sagetex/src pushd build/pkgs/sagetex/src
python setup.py install --root=%{buildroot} --install-purelib=%{python_sitearch} %__python2 setup.py install --root=%{buildroot} --install-purelib=%{python_sitearch}
install -p -m 0644 -D %{SOURCE2} \ install -p -m 0644 -D %{SOURCE2} \
%{buildroot}%{_datadir}/texmf/tex/generic/sagetex/makecmds.sty %{buildroot}%{_datadir}/texmf/tex/generic/sagetex/makecmds.sty
mv %{buildroot}%{_docdir}/{sagetex,%{sagetex_pkg}} mv %{buildroot}%{_docdir}/{sagetex,%{sagetex_pkg}}
@ -959,8 +1000,9 @@ export SAGE_TESTDIR=\$DOT_SAGE/tmp
export SAGE_ROOT="$SAGE_ROOT" export SAGE_ROOT="$SAGE_ROOT"
export SAGE_LOCAL="$SAGE_LOCAL" export SAGE_LOCAL="$SAGE_LOCAL"
export SAGE_SHARE="$SAGE_SHARE" export SAGE_SHARE="$SAGE_SHARE"
export SAGE_EXTCODE="$SAGE_ETC"
export SAGE_ETC="$SAGE_ETC" export SAGE_ETC="$SAGE_ETC"
export SAGE_SRC="$SAGE_SRC" export SAGE_SRC="%{buildroot}%{SAGE_SRC}"
##export SAGE_DOC="$SAGE_DOC" ##export SAGE_DOC="$SAGE_DOC"
module load 4ti2-%{_arch} module load 4ti2-%{_arch}
module load lrcalc-%{_arch} module load lrcalc-%{_arch}
@ -975,6 +1017,9 @@ export SAGE_FORTRAN_LIB=\`gfortran --print-file-name=libgfortran.so\`
export SYMPOW_DIR="\$DOT_SAGE/sympow" export SYMPOW_DIR="\$DOT_SAGE/sympow"
export LC_MESSAGES=C export LC_MESSAGES=C
export LC_NUMERIC=C export LC_NUMERIC=C
export LD_LIBRARY_PATH=\$SAGE_ROOT/lib:\$LD_LIBRARY_PATH
# Required for sage -gdb
export SAGE_DEBUG=no
$SAGE_LOCAL/bin/sage "\$@" $SAGE_LOCAL/bin/sage "\$@"
EOF EOF
#------------------------------------------------------------------------ #------------------------------------------------------------------------
@ -995,9 +1040,6 @@ chmod +x %{buildroot}%{SAGE_LOCAL}/bin/sage3d
# o install csage headers # o install csage headers
# o install .pxi and .pxd files # o install .pxi and .pxd files
pushd src pushd src
# make csage headers available
mkdir -p %{buildroot}%{_includedir}/csage
cp -fa c_lib/include/* %{buildroot}%{_includedir}/csage
for f in `find sage \( -name \*.pxi -o -name \*.pxd -o -name \*.pyx \)`; do for f in `find sage \( -name \*.pxi -o -name \*.pxd -o -name \*.pyx \)`; do
install -p -D -m 0644 $f %{buildroot}%{python_sitearch}/$f install -p -D -m 0644 $f %{buildroot}%{python_sitearch}/$f
done done
@ -1016,7 +1058,7 @@ pushd src/doc
export PATH=%{buildroot}%{_bindir}:$SAGE_LOCAL/bin:$PATH export PATH=%{buildroot}%{_bindir}:$SAGE_LOCAL/bin:$PATH
export SINGULARPATH=%{_libdir}/Singular/LIB export SINGULARPATH=%{_libdir}/Singular/LIB
export SINGULAR_BIN_DIR=%{_libdir}/Singular export SINGULAR_BIN_DIR=%{_libdir}/Singular
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:%{_libdir}/atlas:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=%{_libdir}/atlas:$LD_LIBRARY_PATH
export PYTHONPATH=%{buildroot}%{python_sitearch}:$SAGE_PYTHONPATH:$SAGE_DOC export PYTHONPATH=%{buildroot}%{python_sitearch}:$SAGE_PYTHONPATH:$SAGE_DOC
%if %{with sphinx_hack} %if %{with sphinx_hack}
@ -1026,13 +1068,23 @@ pushd src/doc
%endif %endif
# there we go # there we go
ln -sf %{buildroot}%{SAGE_DOC} $SAGE_SRC/doc ln -sf %{buildroot}%{SAGE_DOC} %{buildroot}%{SAGE_SRC}/doc
LANGUAGES="ca de en fr hu it pt ru tr" python common/builder.py -k all html LANGUAGES="ca de en fr hu it pt ru tr" \
%__python2 common/builder.py --no-pdf-links -k all html
export SAGE_DOC=%{buildroot}%{SAGE_DOC} export SAGE_DOC=%{buildroot}%{SAGE_DOC}
cp -far output $SAGE_DOC cp -far output $SAGE_DOC
rm -f %{buildroot}%{SAGE_SRC}/doc
ln -sf %{SAGE_DOC} %{buildroot}%{SAGE_SRC}/doc
# should not be required and encodes buildroot # should not be required and encodes buildroot
rm -fr $SAGE_DOC/output/doctrees rm -fr $SAGE_DOC/output/doctrees
# FIXME missing
for css in $(find $SAGE_DOC/output/html -name classic.css); do
pushd $(dirname $css)
ln -s classic.css default.css
popd
done
popd popd
%if %{with check} %if %{with check}
@ -1120,9 +1172,68 @@ rm %{buildroot}%{python_sitearch}/sagenb/translations/*/LC_MESSAGES/*.po
rm -r %{buildroot}%{python_sitearch}/sagenb/data/sage3d rm -r %{buildroot}%{python_sitearch}/sagenb/data/sage3d
%endif %endif
# remove build directory in buildroot
[ -d %{buildroot}%{SAGE_SRC}/build ] &&
rm -r %{buildroot}%{SAGE_SRC}/build
%if %{with bundled_pari}
install -D -m 755 %{_builddir}/bin/gp-2.8 %{buildroot}%{SAGE_LOCAL}/bin/gp-2.8
for dest in gp sage_pari; do
ln -sf gp-2.8 %{buildroot}%{SAGE_LOCAL}/bin/$dest
done
install -D -m 755 %{_builddir}/lib/libpari-gmp-2.8.so.0.0.0 \
%{buildroot}%{SAGE_ROOT}/lib/libpari-gmp-2.8.so.0.0.0
ln -s libpari-gmp-2.8.so.0.0.0 \
%{buildroot}%{SAGE_ROOT}/lib/libpari-gmp-2.8.so.0
install -D -m 644 %{_builddir}/share/pari/pari.desc \
%{buildroot}%{SAGE_LOCAL}/pari.desc
# make sure pari is in link path
ln -s libpari-gmp-2.8.so.0.0.0 %{buildroot}%{SAGE_ROOT}/lib/libpari.so
perl -pi -e 's|^(extra_link_args = \[.*)]|$1, "-L%{SAGE_ROOT}/lib"\]|;' %{buildroot}%{python_sitearch}/sage/misc/cython.py
%endif
# remove sage_setup # remove sage_setup
rm -r %{buildroot}%{python_sitearch}/sage_setup rm -r %{buildroot}%{python_sitearch}/sage_setup
# pretend sagemath spkgs are installed to reduce number of errors
# in doctests
mkdir -p %{buildroot}%{SAGE_SPKG_INST}
pushd upstream
for file in *.tar.*; do
touch %{buildroot}%{SAGE_SPKG_INST}/$(echo $file | sed -e 's|\.tar.*||')
done
popd
#------------------------------------------------------------------------
cat > %{buildroot}%{SAGE_LOCAL}/bin/sage-list-packages << EOF
#!/bin/sh
NOVERSION=false
INSTALLED=no
while [ \$# -gt 0 ]; do
if [ x\$1 = x--no-version ]; then
NOVERSION=true
elif [ x\$1 = xinstalled ]; then
INSTALLED=yes
fi
shift
done
if [ \$INSTALLED = no ]; then
exit 0
fi
LIST=\$(cd %{SAGE_SPKG_INST}; echo *)
if [ \$NOVERSION = false ]; then
for pkg in \$LIST; do
echo \$pkg | sed -e 's/-/ /'
done
else
for pkg in \$LIST; do
echo \$pkg | sed -e 's/-.*//'
done
fi
EOF
chmod +x %{buildroot}%{SAGE_LOCAL}/bin/sage-list-packages
#------------------------------------------------------------------------
# last install command # last install command
rm -fr $DOT_SAGE rm -fr $DOT_SAGE
@ -1155,6 +1266,10 @@ exit 0
%{SAGE_LOCAL}/bin/QuadraticSieve %{SAGE_LOCAL}/bin/QuadraticSieve
%{SAGE_LOCAL}/bin/ecm %{SAGE_LOCAL}/bin/ecm
%{SAGE_LOCAL}/bin/gap_stamp %{SAGE_LOCAL}/bin/gap_stamp
%if %{with bundled_pari}
%{SAGE_LOCAL}/bin/gp*
%endif
%{SAGE_LOCAL}/bin/python
%{SAGE_LOCAL}/bin/sage* %{SAGE_LOCAL}/bin/sage*
%{SAGE_LOCAL}/include %{SAGE_LOCAL}/include
%{SAGE_LOCAL}/lib %{SAGE_LOCAL}/lib
@ -1163,7 +1278,9 @@ exit 0
%{SAGE_ROOT}/devel %{SAGE_ROOT}/devel
%{SAGE_ROOT}/share %{SAGE_ROOT}/share
%dir %{SAGE_SRC} %dir %{SAGE_SRC}
%if %{with docs}
%{SAGE_SRC}/doc %{SAGE_SRC}/doc
%endif
%{SAGE_SRC}/sage %{SAGE_SRC}/sage
%dir %{SAGE_PYTHONPATH} %dir %{SAGE_PYTHONPATH}
# MIT # MIT
@ -1172,11 +1289,15 @@ exit 0
%{_bindir}/sage %{_bindir}/sage
%{_datadir}/pixmaps/%{name}.png %{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop %{_datadir}/applications/%{name}.desktop
%if %{with bundled_pari}
%{SAGE_ROOT}/lib
%{SAGE_LOCAL}/pari.desc
%endif
%{SAGE_SPKG_INST}
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%files core %files core
# GPLv2+ # GPLv2+
%{_libdir}/libcsage.so.*
%{python_sitearch}/sage %{python_sitearch}/sage
%{python_sitearch}/sage-*.egg-info %{python_sitearch}/sage-*.egg-info
@ -1202,15 +1323,17 @@ exit 0
%files data-etc %files data-etc
# GPLv2+ # GPLv2+
%{SAGE_ETC}/gap %{SAGE_ETC}/gap
#%#{SAGE_ETC}/graphs
%{SAGE_ETC}/images %{SAGE_ETC}/images
%{SAGE_ETC}/magma %{SAGE_ETC}/magma
%{SAGE_ETC}/maxima
%{SAGE_ETC}/mwrank %{SAGE_ETC}/mwrank
#%#{SAGE_ETC}/notebook-ipython
%{SAGE_ETC}/pari %{SAGE_ETC}/pari
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%files data-graphs %files data-graphs
# GPLv2+ # GPLv2+
%{SAGE_ETC}/graphs
%{SAGE_SHARE}/graphs %{SAGE_SHARE}/graphs
#------------------------------------------------------------------------ #------------------------------------------------------------------------
@ -1218,12 +1341,6 @@ exit 0
# GPL+ # GPL+
%{SAGE_SHARE}/reflexive_polytopes %{SAGE_SHARE}/reflexive_polytopes
#------------------------------------------------------------------------
%files devel
# GPLv2+
%{_includedir}/csage
%{_libdir}/libcsage.so
%if %{with docs} %if %{with docs}
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%files doc %files doc
@ -1291,6 +1408,7 @@ exit 0
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%files notebook %files notebook
%{SAGE_ETC}/notebook-ipython
# GPLv2+ # GPLv2+
%{SAGE_SRC}/sagenb %{SAGE_SRC}/sagenb
%dir %{python_sitearch}/sagenb %dir %{python_sitearch}/sagenb
@ -1376,6 +1494,11 @@ exit 0
######################################################################## ########################################################################
%changelog %changelog
* Tue Dec 22 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 6.8-1
- Update to sagemath 6.8
- Remove scons, lrcalc, cryptominisat, parallel and ipython3 patches
- Add lcalc, fes-build and arb patches
* Fri Dec 4 2015 Jerry James <loganjerry@gmail.com> - 6.5-14 * Fri Dec 4 2015 Jerry James <loganjerry@gmail.com> - 6.5-14
- Rebuild for ntl 9.6.2 - Rebuild for ntl 9.6.2

View file

@ -1 +1 @@
ec9195561ffa2bcbc02391ac5af4e7ed sage-6.5.tar.gz 661f2b2b13669c72d16ea8e6831125e4 sage-6.8.tar.gz