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.4.1.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
--- src/sage/sandpiles/sandpile.py.orig 2014-11-18 15:24:27.192127311 -0200
+++ src/sage/sandpiles/sandpile.py 2014-11-18 15:24:38.049127454 -0200
@@ -23,8 +23,6 @@ packages. An alternative is to install
following variable to the correct path.
"""
--- src/sage/sandpiles/sandpile.py.orig 2015-10-11 17:41:27.067777358 -0300
+++ src/sage/sandpiles/sandpile.py 2015-10-11 17:41:57.909778539 -0300
@@ -347,9 +347,6 @@ from sage.rings.arith import falling_fac
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')
-
r"""
Sage Sandpiles
@@ -4096,7 +4094,7 @@ class SandpileDivisor(dict):
class Sandpile(DiGraph):
"""
Class for Dhar's abelian sandpile model.
@@ -5230,7 +5227,7 @@ class SandpileDivisor(dict):
sign_file.close()
# compute
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
--- src/module_list.py.orig 2015-04-03 15:09:20.200406141 -0300
+++ src/module_list.py 2015-04-03 15:09:39.744406890 -0300
@@ -2187,7 +2187,7 @@ if (os.path.isfile(SAGE_INC + "/cplex.h"
libraries = ["stdc++", "cplex"])
)
diff -up src/sage/numerical/backends/coin_backend.pyx.orig src/sage/numerical/backends/coin_backend.pyx
--- src/sage/numerical/backends/coin_backend.pyx.orig 2015-11-06 10:36:17.498631801 -0200
+++ src/sage/numerical/backends/coin_backend.pyx 2015-11-06 10:36:40.210632670 -0200
@@ -761,8 +761,8 @@ cdef class CoinBackend(GenericBackend):
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
--- src/sage/databases/cremona.py.orig 2015-04-03 15:06:14.304399023 -0300
+++ src/sage/databases/cremona.py 2015-04-03 15:06:26.792399501 -0300
@@ -820,14 +820,9 @@ class MiniCremonaDatabase(SQLDatabase):
--- src/sage/databases/cremona.py.orig 2015-10-11 17:50:01.241797048 -0300
+++ src/sage/databases/cremona.py 2015-10-11 17:52:06.533801845 -0300
@@ -827,14 +827,9 @@ class MiniCremonaDatabase(SQLDatabase):
if N < self.largest_conductor():
message = "There is no elliptic curve with label " + label \
+ " in the database"
@ -17,7 +17,7 @@ diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py
raise ValueError(message)
ainvs = eval(c[0])
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:
return _db
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':
mini = False
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
--- src/module_list.py.orig 2015-04-03 14:55:11.184373629 -0300
+++ src/module_list.py 2015-04-03 14:55:20.536373988 -0300
@@ -2145,7 +2145,8 @@ ext_modules = [
# These extensions are to be compiled only if the
# corresponding packages have been installed
--- src/module_list.py.orig 2015-11-02 18:12:21.186706786 -0200
+++ src/module_list.py 2015-11-02 18:12:48.252707822 -0200
@@ -116,7 +116,6 @@ library_order["stdc++"] = 1000
###
#############################################################
-from sage.misc.package import is_package_installed
+def is_package_installed(name):
+ return False
-from sage_setup.optional_extension import OptionalExtension
UNAME = os.uname()
if is_package_installed('fes'):
ext_modules.extend([
def uname_specific(name, value, alternative):
@@ -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
--- src/module_list.py.orig 2015-04-03 15:10:36.432409060 -0300
+++ src/module_list.py 2015-04-03 15:10:46.240409436 -0300
@@ -2149,7 +2149,7 @@ ext_modules = [
def is_package_installed(name):
return False
--- src/module_list.py.orig 2015-10-11 18:08:06.689838613 -0300
+++ src/module_list.py 2015-10-11 18:08:21.686839187 -0300
@@ -515,11 +515,11 @@ ext_modules = [
libraries = ["ecl"],
depends = [SAGE_INC + '/ecl/ecl.h']),
-if is_package_installed('fes'):
+if 1:
ext_modules.extend([
Extension("sage.libs.fes",
["sage/libs/fes.pyx"],
- Extension("sage.libs.fes",
- ["sage/libs/fes.pyx"],
- language = "c",
- libraries = ['fes'],
- 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
--- src/sage/groups/perm_gps/permgroup.py.orig 2015-04-03 15:08:05.769403291 -0300
+++ src/sage/groups/perm_gps/permgroup.py 2015-04-03 15:08:15.296403656 -0300
@@ -181,8 +181,7 @@ def hap_decorator(f):
--- src/sage/groups/perm_gps/permgroup.py.orig 2015-10-11 17:56:24.028811706 -0300
+++ src/sage/groups/perm_gps/permgroup.py 2015-10-11 17:58:26.629816401 -0300
@@ -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)
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()
from sage.rings.arith import is_prime
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
"""

View file

@ -1,7 +1,7 @@
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 2014-05-26 13:28:45.777771582 -0300
@@ -141,6 +141,7 @@ operator*(const SL2Z& M, const vector<mp
--- src/sage/modular/arithgroup/farey.cpp.orig 2015-10-11 17:20:15.809728677 -0300
+++ src/sage/modular/arithgroup/farey.cpp 2015-10-11 17:20:28.178729151 -0300
@@ -136,6 +136,7 @@ operator*(const SL2Z& M, const vector<mp
return result;
}
@ -9,7 +9,7 @@ diff -up src/sage/modular/arithgroup/farey.cpp.orig src/sage/modular/arithgroup/
inline
mpz_class
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;
}
}

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
--- src/sage/interfaces/jmoldata.py.orig 2014-08-12 14:13:57.189963669 -0300
+++ src/sage/interfaces/jmoldata.py 2014-08-12 14:16:21.359969189 -0300
@@ -139,8 +139,6 @@ class JmolData(SageObject):
--- src/sage/interfaces/jmoldata.py.orig 2015-10-11 17:48:03.194792527 -0300
+++ src/sage/interfaces/jmoldata.py 2015-10-11 17:48:39.748793927 -0300
@@ -146,8 +146,6 @@ class JmolData(SageObject):
sage: print os.path.exists(testfile) # optional -- java
True
"""
- # Set up paths, file names and scripts
- jmolpath = os.path.join(SAGE_LOCAL, "share", "jmol", "JmolData.jar")
launchscript = ""
if (datafile_cmd!='script'):
launchscript = "load "
@@ -152,9 +150,8 @@ class JmolData(SageObject):
scratchout = tmp_filename(ext=".txt")
with open(scratchout, 'w') as jout:
# Now call the java application and write the file.
target_native = targetfile
import sys
if sys.platform == 'cygwin':
@@ -172,10 +170,8 @@ class JmolData(SageObject):
env = dict(os.environ)
env['LC_ALL'] = 'C'
env['LANG'] = 'C'
- subprocess.call(["java", "-Xmx512m", "-Djava.awt.headless=true",
- "-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,
+ "-J",launchscript,"-j",imagescript],stdout=jout)
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
--- src/sage/geometry/polyhedron/base.py.orig 2015-04-03 15:06:44.704400187 -0300
+++ src/sage/geometry/polyhedron/base.py 2015-04-03 15:06:59.632400758 -0300
@@ -3242,11 +3242,6 @@ class Polyhedron_base(Element):
--- src/sage/geometry/polyhedron/base.py.orig 2015-10-11 17:54:35.252807540 -0300
+++ src/sage/geometry/polyhedron/base.py 2015-10-11 17:54:41.621807784 -0300
@@ -3371,10 +3371,6 @@ class Polyhedron_base(Element):
David Avis's lrs program.
"""
- if is_package_installed('lrs') != True:
- print 'You must install the optional lrs package ' \
- 'for this function to work'
- raise NotImplementedError
- if not is_package_installed('lrslib'):
- raise NotImplementedError('You must install the optional lrslib package '
- 'for this function to work')
-
from sage.misc.temporary_file import tmp_filename
from subprocess import Popen, PIPE

View file

@ -1,6 +1,6 @@
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 2015-04-03 15:04:43.255395536 -0300
--- src/bin/sage-maxima.lisp.orig 2015-10-11 17:39:58.025773948 -0300
+++ src/bin/sage-maxima.lisp 2015-10-11 17:40:00.218774032 -0300
@@ -3,4 +3,8 @@
;(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-output* (open "/dev/stdout" :direction :output))
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 2015-04-03 15:04:43.256395536 -0300
@@ -551,7 +551,7 @@ class Maxima(MaximaAbstract, Expect):
--- src/sage/interfaces/maxima.py.orig 2015-10-11 17:39:41.677773322 -0300
+++ src/sage/interfaces/maxima.py 2015-10-11 17:40:00.219774032 -0300
@@ -552,7 +552,7 @@ class Maxima(MaximaAbstract, Expect):
Expect.__init__(self,
name = 'maxima',
prompt = '\(\%i[0-9]+\) ',
@ -23,7 +23,7 @@ diff -up src/sage/interfaces/maxima.py.orig src/sage/interfaces/maxima.py
maxread = 10000,
script_subdirectory = script_subdirectory,
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
# 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._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
--- src/sage/graphs/graph_generators.py.orig 2015-04-03 15:07:35.008402113 -0300
+++ src/sage/graphs/graph_generators.py 2015-04-03 15:07:44.816402489 -0300
@@ -827,7 +827,7 @@ class GraphGenerators():
--- src/sage/graphs/graph_generators.py.orig 2015-10-11 17:55:39.963810018 -0300
+++ src/sage/graphs/graph_generators.py 2015-10-11 17:55:46.861810283 -0300
@@ -838,8 +838,7 @@ class GraphGenerators():
>A geng -d0D3 n=4 e=0-6
"""
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 1:
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,

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.
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 2015-01-13 20:00:00.000000000 -0700
@@ -291,10 +291,10 @@ cdef extern from "pb_wrap.h":
--- src/sage/libs/polybori/decl.pxd.orig 2015-10-11 18:10:28.994844062 -0300
+++ src/sage/libs/polybori/decl.pxd 2015-10-11 18:11:16.004845863 -0300
@@ -289,10 +289,10 @@ cdef extern from "sage/libs/polybori/pb_
int (* size)()
PBPolyEntry (* get "operator[]")(int)
- ctypedef struct PBFglmStrategy "WrappedPtr<FGLMStrategy>":
- ctypedef struct PBFglmStrategy "PBWrappedPtr<FGLMStrategy>":
+ ctypedef struct PBFglmStrategy "WrappedPointer<FGLMStrategy>":
PBPolyVector (* main "operator->()->main")()
- PBFglmStrategy PBFglmStrategy_Constructor "WrappedPtr<FGLMStrategy>" \
- PBFglmStrategy PBFglmStrategy_Constructor "PBWrappedPtr<FGLMStrategy>" \
+ PBFglmStrategy PBFglmStrategy_Constructor "WrappedPointer<FGLMStrategy>" \
(PBRing from_ring, PBRing to_ring, PBPolyVector vec)
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
--- src/sage/libs/polybori/pb_wrap.h.orig 2014-11-23 07:58:14.000000000 -0700
+++ src/sage/libs/polybori/pb_wrap.h 2015-01-13 20:00:00.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-10-11 18:12:42.724849183 -0300
@@ -177,23 +177,23 @@ PyObject* preallocated_to_PyString(const
template <class Type>
-class WrappedPtr:
-class PBWrappedPtr:
+class WrappedPointer:
public boost::shared_ptr<Type> {
- typedef WrappedPtr self;
- typedef PBWrappedPtr self;
+ typedef WrappedPointer self;
typedef boost::shared_ptr<Type> base;
public:
- WrappedPtr(): base() {}
- WrappedPtr(const self& rhs): base(rhs) {}
- PBWrappedPtr(): base() {}
- PBWrappedPtr(const self& rhs): base(rhs) {}
+ WrappedPointer(): base() {}
+ WrappedPointer(const self& rhs): base(rhs) {}
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)) {}
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)) {}
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):
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
+++ ./src/c_lib/include/ntl_wrap.h 2015-09-25 13:51:18.989444339 -0600
@@ -35,7 +35,7 @@ using namespace NTL;
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
diff -up src/sage/rings/bernmm/bernmm-test.cpp.orig src/sage/rings/bernmm/bernmm-test.cpp
--- src/sage/rings/bernmm/bernmm-test.cpp.orig 2015-10-11 18:17:42.808860675 -0300
+++ src/sage/rings/bernmm/bernmm-test.cpp 2015-10-11 18:18:44.684863044 -0300
@@ -70,7 +70,7 @@ void bern_naive(mpq_t* res, long n)
*/
int testcase__bern_modp_powg(long p, long k, mpq_t b)
@ -63,8 +19,9 @@
if (PowerMod(2, k, p, pinv) == 1)
return 1;
--- ./src/sage/rings/bernmm/bern_modp.cpp.orig 2015-02-16 17:15:12.000000000 -0700
+++ ./src/sage/rings/bernmm/bern_modp.cpp 2015-09-26 14:15:34.862360481 -0600
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-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 {
pinv = 1 / ((double) p)
g = a multiplicative generator of GF(p), in [0, p)
@ -118,15 +75,6 @@
{
Factorisation F(p-1);
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)
if (m == 0)
return -1;
@ -136,8 +84,9 @@
long x = _bern_modp(p, pinv, m); // = B_m/m mod p
return MulMod(x, k, p, pinv);
}
--- ./src/sage/rings/bernmm/bern_modp.h.orig 2015-02-16 17:15:12.000000000 -0700
+++ ./src/sage/rings/bernmm/bern_modp.h 2015-09-26 09:19:28.365229754 -0600
diff -up src/sage/rings/bernmm/bern_modp.h.orig src/sage/rings/bernmm/bern_modp.h
--- 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 @@
#ifndef 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
+++ ./src/sage/rings/bernmm/bern_modp_util.cpp 2015-09-26 09:19:57.474935651 -0600
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.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;
namespace bernmm {
@ -186,8 +136,9 @@
{
if (p == 2)
return 1;
--- ./src/sage/rings/bernmm/bern_modp_util.h.orig 2015-02-16 17:15:12.000000000 -0700
+++ ./src/sage/rings/bernmm/bern_modp_util.h 2015-09-26 09:20:26.423623021 -0600
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.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 @@
#include <vector>
#include <cassert>
@ -221,3 +172,15 @@
}; // 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
--- src/sage/libs/pari/decl.pxi.orig 2015-04-03 17:09:59.840683372 -0300
+++ src/sage/libs/pari/decl.pxi 2015-04-03 17:10:10.876683795 -0300
@@ -165,7 +165,6 @@ cdef extern from 'parisage.h':
extern int new_galois_format, precdl
# 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)
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-10-11 17:43:43.037782565 -0300
+++ src/sage/libs/pari/handle_error.pxd 2015-10-11 17:46:28.004788882 -0300
@@ -1,5 +1,5 @@
include 'sage/libs/pari/decl.pxi'
@@ -3757,6 +3756,3 @@ cdef extern from 'pari/paripriv.h':
unsigned long flags
extern gp_data* GP_DATA
-
-cdef extern from 'pari/anal.h':
- char* closure_func_err()
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)
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 2015-04-03 17:10:10.876683795 -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-10-11 17:45:11.844785966 -0300
@@ -131,13 +131,13 @@ cdef void _pari_init_error_handling():
sage: pari('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:
pari_free(errstr)
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 2015-04-03 17:10:10.874683795 -0300
@@ -6,6 +6,10 @@ cimport cython
--- src/sage/libs/pari/pari_instance.pxd.orig 2015-10-11 17:43:43.028782564 -0300
+++ src/sage/libs/pari/pari_instance.pxd 2015-10-11 17:45:37.884786963 -0300
@@ -7,6 +7,10 @@ cimport cython
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)
@cython.final
cdef class PariInstance_auto(ParentWithBase):
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 2015-04-03 17:10:10.874683795 -0300
@@ -417,7 +417,12 @@ cdef class PariInstance(sage.structure.p
--- src/sage/libs/pari/pari_instance.pyx.orig 2015-10-11 17:43:43.032782565 -0300
+++ src/sage/libs/pari/pari_instance.pyx 2015-10-11 17:46:14.596788369 -0300
@@ -429,7 +429,12 @@ cdef class PariInstance(PariInstance_aut
# The size here doesn't really matter, because we will allocate
# our own stack anyway. We ask PARI not to set up signal and
# 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)
+ mp_set_memory_functions(_gmp_malloc, _gmp_realloc, _gmp_free)
_pari_init_error_handling()
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)
# Disable PARI's stack overflow checking which is incompatible
# with multi-threading.

View file

@ -1,30 +1,39 @@
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 2015-04-03 15:03:57.589393787 -0300
@@ -1097,7 +1097,7 @@ ext_modules = [
--- src/module_list.py.orig 2015-10-11 18:06:18.785834481 -0300
+++ src/module_list.py 2015-10-11 18:06:31.557834970 -0300
@@ -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',
sources = ['sage/matrix/matrix_mod2_dense.pyx'],
- libraries = ['gmp','m4ri', 'gd', 'png12', 'z'],
+ libraries = ['gmp','m4ri', 'gd', 'png', 'z'],
- libraries = ['m4ri', 'gd', 'png12', 'z'],
+ libraries = ['m4ri', 'gd', 'png', 'z'],
extra_compile_args = m4ri_extra_compile_args,
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',
sources = ['sage/modules/vector_mod2_dense.pyx'],
- libraries = ['gmp','m4ri', 'png12', 'gd'],
+ libraries = ['gmp','m4ri', 'png', 'gd'],
- libraries = ['m4ri', 'png12', 'gd'],
+ libraries = ['m4ri', 'png', 'gd'],
extra_compile_args = m4ri_extra_compile_args,
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',
sources = ['sage/rings/polynomial/pbori.pyx'],
libraries=['polybori-' + polybori_major_version,
- 'polybori_groebner-' + polybori_major_version, 'm4ri', 'gd', 'png12'],
+ '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"] ] + \
[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
--- src/sage/libs/polybori/decl.pxd.orig 2015-09-06 21:05:55.575916057 -0300
+++ src/sage/libs/polybori/decl.pxd 2015-09-06 21:05:57.745916140 -0300
@@ -12,8 +12,8 @@ cdef extern from "pb_wrap.h":
--- src/sage/libs/polybori/decl.pxd.orig 2015-10-11 18:23:04.338872987 -0300
+++ src/sage/libs/polybori/decl.pxd 2015-10-11 18:23:09.548873187 -0300
@@ -10,8 +10,8 @@ cdef extern from "sage/libs/polybori/pb_
pbdp_asc "CTypes::dp_asc"
pbblock_dlex "CTypes::block_dlex"
pbblock_dp_asc "CTypes::block_dp_asc"

View file

@ -1,7 +1,7 @@
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 2015-04-03 15:02:06.559389536 -0300
@@ -296,11 +296,11 @@ def _write_started_file():
--- src/sage/all.py.orig 2015-10-11 17:37:19.705767886 -0300
+++ src/sage/all.py 2015-10-11 17:37:41.748768730 -0300
@@ -294,11 +294,11 @@ def _write_started_file():
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(DOT_SAGE, 'sage-started.txt')
# Do nothing if the file already exists
if os.path.isfile(started_file):
return
# Current time with a resolution of 1 second
import datetime

View file

@ -1,7 +1,7 @@
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 2015-04-03 14:56:03.416375630 -0300
@@ -4,7 +4,7 @@ import os
--- src/module_list.py.orig 2015-12-09 18:09:26.357141568 -0200
+++ src/module_list.py 2015-12-09 18:09:36.501141956 -0200
@@ -3,7 +3,7 @@ from glob import glob
from distutils.extension import Extension
from sage.env import SAGE_LOCAL
@ -10,21 +10,7 @@ diff -up src/module_list.py.orig src/module_list.py
#########################################################
### BLAS setup
@@ -35,10 +35,11 @@ else:
### 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
@@ -66,7 +66,7 @@ givaro_extra_compile_args =['-D__STDC_LI
### 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_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
--- src/setup.py.orig 2015-04-03 14:56:00.033375500 -0300
+++ src/setup.py 2015-04-03 14:56:03.416375630 -0300
@@ -36,11 +36,11 @@ except KeyError:
compile_result_dir = None
--- src/setup.py.orig 2015-12-09 18:09:33.813141853 -0200
+++ src/setup.py 2015-12-09 18:13:21.819150584 -0200
@@ -64,6 +64,7 @@ except KeyError:
keep_going = False
-SAGE_INC = os.path.join(SAGE_LOCAL, 'include')
+SAGE_INC = '/usr/include'
# search for dependencies and add to gcc -I<path>
include_dirs = [SAGE_INC,
- os.path.join(SAGE_INC, 'csage'),
+ 'c_lib/include',
SAGE_SRC,
os.path.join(SAGE_SRC, 'sage', 'ext')]
+SAGE_INC = '/usr/include'
include_dirs = sage_include_directories(use_sources=True)
@@ -171,10 +171,12 @@ for m in ext_modules:
m.libraries = ['csage'] + m.libraries
if m.language == 'c++':
m.libraries.append('stdc++')
+ m.libraries.append('ntl')
+ m.libraries = m.libraries + ['gmp', 'm', 'dl']
# Manually add -fno-strict-aliasing, which is needed to compile Cython
@@ -567,11 +568,9 @@ def run_cythonize():
print('Enabling Cython profiling support')
profile = True
m.extra_compile_args = m.extra_compile_args + extra_compile_args
m.extra_link_args = m.extra_link_args + extra_link_args
- m.library_dirs = m.library_dirs + [os.path.join(SAGE_LOCAL, "lib")]
+ m.library_dirs += ['c_lib', '%s/lib' % SAGE_LOCAL]
m.include_dirs = m.include_dirs + include_dirs
- # Disable Cython caching (the cache is stored in ~/.cycache which is
+ # Enable Cython caching (the cache is stored in ~/.cycache which is
# Cython's default).
- # Cycache is currently too broken to use reliably:
- # http://trac.sagemath.org/ticket/17851
- Cython.Compiler.Main.default_options['cache'] = False
+ Cython.Compiler.Main.default_options['cache'] = True
@@ -579,20 +581,6 @@ print "Discovered Python source, time: %
force = True
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*'))
-for output_dir in output_dirs:
- 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))
-
-

View file

@ -1,6 +1,6 @@
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 2015-04-03 14:56:58.208377728 -0300
--- src/doc/common/builder.py.orig 2015-12-22 10:55:07.586513923 -0200
+++ 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
# SAGE_DOC, LANGUAGES, SPHINXOPTS, PAPER, OMIT,
# 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'))
@@ -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
--- src/doc/common/conf.py.orig 2015-04-03 14:56:53.777377558 -0300
+++ src/doc/common/conf.py 2015-04-03 14:56:58.208377728 -0300
--- src/doc/common/conf.py.orig 2015-12-22 10:55:07.588513923 -0200
+++ src/doc/common/conf.py 2015-12-22 10:55:10.132514020 -0200
@@ -1,5 +1,5 @@
import sys, os, sphinx
-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
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
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')
# 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
--- src/sage/doctest/control.py.orig 2015-04-03 14:56:32.065376727 -0300
+++ src/sage/doctest/control.py 2015-04-03 14:56:58.209377728 -0300
@@ -89,7 +89,6 @@ class DocTestDefaults(SageObject):
--- src/sage/doctest/control.py.orig 2015-12-22 10:55:07.592513923 -0200
+++ src/sage/doctest/control.py 2015-12-22 10:55:27.152514672 -0200
@@ -90,7 +90,6 @@ class DocTestDefaults(SageObject):
self.valgrind = False
self.massif = 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.new = 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:
# Interactive debuggers: "infinite" timeout
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
options.timeout = int(os.getenv('SAGE_TIMEOUT_VALGRIND', 48 * 60 * 60))
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:
toolname = "cachegrind"
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:
flags %= toolname + ".%p" # replace %s with toolname
cmd += flags + sage_cmd
@@ -956,10 +950,10 @@ class DocTestController(SageObject):
@@ -1006,10 +999,10 @@ class DocTestController(SageObject):
0
"""
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()
else:
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 2015-04-03 14:56:58.210377728 -0300
@@ -2149,7 +2149,7 @@ def generate_docstring_dictionary():
--- src/sage/interfaces/singular.py.orig 2015-12-22 10:55:07.594513923 -0200
+++ src/sage/interfaces/singular.py 2015-12-22 10:55:10.134514020 -0200
@@ -2232,7 +2232,7 @@ def generate_docstring_dictionary():
nodes.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
--- src/bin/sage.orig 2015-04-03 14:45:35.718351593 -0300
+++ src/bin/sage 2015-04-03 14:54:09.029371249 -0300
@@ -13,11 +13,9 @@ usage() {
--- src/bin/sage.orig 2015-11-07 11:53:13.984795336 -0200
+++ src/bin/sage 2015-11-07 11:53:51.199796761 -0200
@@ -13,19 +13,15 @@ usage() {
echo " file.[sage|py|spyx] -- run given .sage, .py or .spyx file"
echo " -advanced -- list all command line options"
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 " -h, -? -- print this help message"
- 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 " -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 " 'default', 'sagenb', and 'ipython')"
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 " -R [...] -- run Sage's R 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 " --sagenb - test all sagenb files"
echo " --help - show all testing options"
- echo " -upgrade [version] -- download, build and install the given version. Here,"
- 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 " -v, -version -- print the Sage version"
echo " -v, -version -- display Sage version information"
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 " -q -- quiet; start with no banner"
echo " -root -- print the Sage root directory"
- echo " -gthread, -qthread, -q4thread, -wthread, -pylab"
- 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
#### 1.......................26..................................................78
@@ -76,8 +66,6 @@ usage_advanced() {
@@ -77,8 +66,6 @@ usage_advanced() {
echo " 'default', 'sagenb', and 'ipython'). See the output"
echo " of sage --notebook --help for more details and"
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 " -n, -notebook [...] -- start the default Sage notebook (options are 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 " -ipython [...] -- run Sage's IPython using the default environment (not"
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 " -mwrank [...] -- run Sage's mwrank with given arguments"
echo " -python [...] -- run the Python interpreter"
@@ -115,44 +99,7 @@ usage_advanced() {
@@ -116,45 +99,7 @@ usage_advanced() {
echo
#### 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 " -upgrade [version] -- download, build and install the given version. Here,"
- 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 " -pip [...] -- invoke pip, the Python package manager"
-
- echo
- #### 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 " start up; optionally specify a module to get more"
echo " details about that particular module"
@@ -163,7 +110,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() {
@@ -184,7 +129,6 @@ usage_advanced() {
echo " -coverage <files> -- give info about doctest coverage of files"
echo " -coverageall -- give summary info about doctest coverage of all"
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_doc <string> -- search through the Sage documentation for string"
echo " -grep <string> -- same as -search_src"
@@ -202,15 +147,6 @@ usage_advanced() {
@@ -204,15 +148,6 @@ usage_advanced() {
echo
#### 1.......................26..................................................78
#### |.....................--.|...................................................|
- 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_nc <dir> -- as -pkg, but do not compress the package"
- 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 " -cachegrind -- run Sage using Valgrind's cachegrind tool. The log"
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 " files are named sage-memcheck.PID can be found in"
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
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
fi
@ -189,10 +193,11 @@ diff -up src/bin/sage.orig src/bin/sage
if [ $# -gt 0 ]; then
if [ "$1" = '-h' -o "$1" = '-?' -o "$1" = '-help' -o "$1" = '--help' ]; then
usage
@@ -286,24 +191,11 @@ fi
@@ -287,25 +188,11 @@ fi
# Prepare for running Sage, either interactively or non-interactively.
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
- echo >&2 '************************************************************************'
- 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
# make sure that $DOT_SAGE exists so that ipython will happily
# create its config directories there. If DOT_SAGE doesn't
@@ -313,21 +205,6 @@ sage_setup() {
sage-cleaner &>/dev/null &
@@ -316,20 +203,6 @@ sage_setup() {
}
-
-# 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
-# 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.
interactive_sage() {
sage_setup
@@ -389,7 +266,7 @@ fi
@@ -396,7 +269,7 @@ fi
if [ "$1" = '-singular' -o "$1" = '--singular' ]; then
shift
@ -245,7 +249,7 @@ diff -up src/bin/sage.orig src/bin/sage
fi
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 "$@"
fi
@ -262,19 +266,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
shift
exec maxima "$@"
@@ -447,11 +314,6 @@ if [ "$1" = '-scons' -o "$1" = '--scons'
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
@@ -474,16 +337,6 @@ if [ "$1" = '-ipython' -o "$1" = '--ipyt
exec ipython "$@"
fi
@ -291,7 +283,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = '-sh' -o "$1" = '--sh' ]; then
# AUTHORS:
# - Carl Witty and William Stein: initial version
@@ -596,20 +448,6 @@ EOF
@@ -603,20 +456,6 @@ EOF
fi
#####################################################################
@ -312,19 +304,19 @@ diff -up src/bin/sage.orig src/bin/sage
# File conversion
#####################################################################
@@ -627,11 +465,6 @@ fi
@@ -634,11 +473,6 @@ fi
# Run Sage's versions of the standard Algebra/Geometry etc. software
#####################################################################
-build_sage() {
- maybe_sage_location
- sage-build "$@" || exit $?
- ( cd "$SAGE_SRC" && $MAKE ) || exit $?
-}
-
if [[ "$1" =~ ^--notebook=.* || "$1" =~ ^-n=.* || "$1" =~ ^-notebook=.* ]] ; then
sage-cleaner &>/dev/null &
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 "$@"
fi
@ -338,19 +330,17 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then
shift
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
fi
-if [ "$1" = '-b' ]; then
- shift
- time build_sage "$@"
- time build_sage
- exit $?
-fi
-
-if [ "$1" = '-br' -o "$1" = "--br" ]; then
- shift
- build_sage "$@"
- build_sage
- interactive_sage
-fi
-
@ -360,8 +350,8 @@ diff -up src/bin/sage.orig src/bin/sage
fi
-if [ "$1" = '-ba' -o "$1" = '-ba-force' -o "$1" = '--ba-force' ]; then
- shift
- build_sage -b "$@"
- ( cd "$SAGE_SRC" && make clean )
- build_sage
- exit $?
-fi
-
@ -373,15 +363,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ ! -f "$DOT_SAGE"/init.sage ]; then
echo >&2 "init.sage does not exist ... creating"
touch "$DOT_SAGE"/init.sage
fi
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"
@@ -715,17 +523,6 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1"
fi
fi
@ -392,13 +374,14 @@ diff -up src/bin/sage.orig src/bin/sage
- shift
- SAGE_BANNER="no"
- sage_setup
- export PYTHONIOENCODING="utf-8" # Fix encoding for doctests
- exec sage-runtests --new "$@"
-fi
-
if [ "$1" = '-testall' -o "$1" = "--testall" ]; then
shift
SAGE_BANNER="no"
@@ -734,136 +529,6 @@ if [ "$1" = '-c' ]; then
@@ -742,140 +539,6 @@ if [ "$1" = '-c' ]; then
exec sage-eval "$@"
fi
@ -432,7 +415,7 @@ diff -up src/bin/sage.orig src/bin/sage
- PKG_NAME=`echo "$PKG" | sed -e "s/\.spkg$//"`
- PKG_NAME=`basename "$PKG_NAME"`
-
- "$SAGE_ROOT"/build/pipestatus \
- "$SAGE_ROOT"/build/make/pipestatus \
- "sage-spkg $OPTINFO $OPTF $OPTS $OPTC '$PKG' 2>&1" \
- "(trap '' SIGINT; tee -a '$SAGE_ROOT/logs/install.log' '$SAGE_LOGS/$PKG_NAME.log')"
- # 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
- exec sage-list-packages optional
- shift
- exec sage-list-packages optional $@
-fi
-
-if [ "$1" = '-experimental' -o "$1" = "--experimental" ]; then
- exec sage-list-packages experimental
- shift
- exec sage-list-packages experimental $@
-fi
-
-if [ "$1" = '-standard' -o "$1" = "--standard" ]; then
- exec sage-list-packages standard
- shift
- exec sage-list-packages standard $@
-fi
-
-if [ "$1" = '-installed' -o "$1" = "--installed" ]; then
- exec sage-list-packages installed
- shift
- exec sage-list-packages installed $@
-fi
-
-if [ "$1" = '-i' ]; then
@ -535,7 +522,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
shift
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 "$@"
fi
@ -560,12 +547,17 @@ diff -up src/bin/sage.orig src/bin/sage
-fi
-
if [ $# -ge 1 ]; then
T=`echo "$1" | sed -e "s/.*\.//"`
if [ "$T" = "spkg" ]; then
- T=`echo "$1" | sed -e "s/.*\.//"`
- 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
--- src/bin/sage-runtests.orig 2015-04-03 14:45:48.439352080 -0300
+++ src/bin/sage-runtests 2015-04-03 14:54:20.773371699 -0300
@@ -54,10 +54,6 @@ if __name__ == "__main__":
--- src/bin/sage-runtests.orig 2015-11-07 11:53:13.991795336 -0200
+++ src/bin/sage-runtests 2015-11-07 11:53:18.458795507 -0200
@@ -55,10 +55,6 @@ if __name__ == "__main__":
help="run doctests using Valgrind's cachegrind tool. The log "
"files are named sage-cachegrind.PID and can be found in " +
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,
help="doctest only those files that failed in the previous run")
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 2015-04-03 14:54:41.525372494 -0300
--- src/bin/sage-valgrind.orig 2015-11-07 11:53:13.997795336 -0200
+++ src/bin/sage-valgrind 2015-11-07 11:53:18.458795507 -0200
@@ -1,16 +1,6 @@
#!/usr/bin/env bash

View file

@ -1,7 +1,7 @@
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 2014-08-12 14:25:03.802989196 -0300
@@ -86,7 +86,7 @@ _add_variable_or_fallback('HOSTNAME',
--- src/sage/env.py.orig 2015-10-11 18:09:31.532841862 -0300
+++ src/sage/env.py 2015-10-11 18:09:40.426842203 -0300
@@ -87,7 +87,7 @@ _add_variable_or_fallback('HOSTNAME',
_add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid())
# 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_LOCAL', opj('$SAGE_ROOT', 'local'))
_add_variable_or_fallback('SAGE_ETC', opj('$SAGE_LOCAL', 'etc'))
_add_variable_or_fallback('SAGE_SHARE', opj('$SAGE_LOCAL', 'share'))
@@ -98,7 +98,7 @@ _add_variable_or_fallback('SAGE_LIB',
_add_variable_or_fallback('SAGE_INC', opj('$SAGE_LOCAL', 'include'))
@@ -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_LOGS', opj('$SAGE_ROOT', 'logs', 'pkgs'))
_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('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_DISTFILES', opj('$SAGE_ROOT', 'upstream'))

View file

@ -1,5 +1,7 @@
%global __provides_exclude_from .*/site-packages/.*\\.so
%bcond_without bundled_pari
# for faster full rpm test builds
%bcond_without docs
@ -21,9 +23,12 @@
%global SAGE_TIMEOUT_LONG 180
%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 graphs_pkg graphs-20130920
%if %{with bundled_pari}
%global pari_pkg pari-2.8-1637-g489005a
%endif
%global pexpect_pkg pexpect-2.0
%global polytopes_db_pkg polytopes_db-20120220
%global rubiks_pkg rubiks-20070912
@ -37,12 +42,13 @@
%global SAGE_SHARE %{_datadir}/sagemath
%global SAGE_ETC %{SAGE_SHARE}/etc
%global SAGE_PYTHONPATH %{SAGE_ROOT}/site-packages
%global SAGE_SPKG_INST %{SAGE_LOCAL}/var/lib/sage/installed
Name: sagemath
Group: Applications/Engineering
Summary: A free open-source mathematics software system
Version: 6.5
Release: 14%{?dist}
Version: 6.8
Release: 1%{?dist}
# The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
# Additionally, every $files section has a comment with the license name
# 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
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
Patch1: %{name}-gmp.patch
@ -123,20 +120,19 @@ Patch15: %{name}-nauty.patch
# http://www-gap.mcs.st-and.ac.uk/Packages/hap.html
Patch16: %{name}-gap-hap.patch
# enable lrcalc
Patch17: %{name}-lrcalc.patch
# correct path to Lfunction include
Patch17: %{name}-lcalc.patch
# enable cbc
# avoid assertion in coin backend
Patch18: %{name}-cbc.patch
# Use system gap directories
Patch19: %{name}-libgap.patch
# enable fes
Patch20: %{name}-fes.patch
# enable cryptominisat
Patch21: %{name}-cryptominisat.patch
# Build fes
Patch20: %{name}-fes-build.patch
# Disable fes
Patch21: %{name}-fes.patch
# Side effect of using distro packages
# https://bugzilla.redhat.com/show_bug.cgi?id=974769
@ -145,24 +141,22 @@ Patch22: %{name}-sympy.patch
# Fix a name clash with NTL
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
Patch26: %{name}-ntl9.patch
Patch24: %{name}-ntl9.patch
# Correct unable to start QEPCAD within sage
# https://bugzilla.redhat.com/show_bug.cgi?id=1243590
Patch27: %{name}-qepcad.patch
Patch25: %{name}-qepcad.patch
# Temporary correction for invalid conversion from
# '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: arb-devel
BuildRequires: atlas-devel
BuildRequires: cddlib-tools
BuildRequires: cliquer-devel
@ -209,8 +203,11 @@ BuildRequires: mpfi-devel
BuildRequires: ntl-devel
BuildRequires: numpy
BuildRequires: palp
%if %{without bundled_pari}
BuildRequires: pari-devel
BuildRequires: pari-gp
%endif
BuildRequires: planarity-devel
BuildRequires: ppl-devel
BuildRequires: pynac-devel
BuildRequires: python2-devel
@ -229,12 +226,13 @@ BuildRequires: R
BuildRequires: ratpoints-devel
BuildRequires: readline-devel
BuildRequires: rpy
BuildRequires: rw-devel
BuildRequires: scons
BuildRequires: Singular-devel
BuildRequires: stix-math-fonts
BuildRequires: symmetrica-devel
BuildRequires: sympow
BuildRequires: sympy
BuildRequires: symmetrica-devel
BuildRequires: texlive
# For _jsdir macro
BuildRequires: web-assets-devel
@ -284,7 +282,9 @@ Requires: R
Requires: rpy
Requires: %{name}-core
Requires: %{name}-data
%if %{with docs}
Requires: %{name}-doc-en
%endif
Requires: %{name}-notebook
Requires: %{name}-rubiks
Requires: %{name}-sagetex
@ -306,6 +306,7 @@ packages into a common Python-based interface.
Summary: Open Source Mathematics Software
Group: Applications/Engineering
Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-devel < 6.8-1
%description core
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
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}
#------------------------------------------------------------------------
%package doc
@ -575,6 +566,18 @@ pushd build/pkgs/graphs
mv %{graphs_pkg} src
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
tar jxf ../../../upstream/%{pexpect_pkg}.tar.bz2
mv %{pexpect_pkg} src
@ -614,7 +617,6 @@ pushd build/pkgs/sagetex
mv %{sagetex_pkg} src
popd
%patch0
%patch1
%patch2
%patch3
@ -622,11 +624,14 @@ popd
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
%if %{without bundled_pari}
%patch11
%endif
%patch12
%patch13
%patch14
@ -638,18 +643,16 @@ popd
%if %{with fes}
%patch20
%else
%patch21
%endif
%patch21
%patch22
%patch23
%patch24
%if 0%{fedora} > 22
%patch25
%endif
%patch26
%patch27
%patch28
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
-e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
@ -705,30 +708,52 @@ export PATH=%{buildroot}%{_bindir}:$PATH
export PYTHONPATH=%{buildroot}%{python_sitearch}:$PYTHONPATH
#------------------------------------------------------------------------
pushd src/c_lib
# scons ignores most environment variables
# and does not have soname support
ldflags=$(sed 's/[[:blank:]]*$//' <<< "%{__global_ldflags}")
sed -e 's|@@includedir@@|%{_includedir}|g' \
-e 's|@@libdir@@|%{_libdir}|g' \
-e 's|@@optflags@@|%{optflags}|g' \
-e "s|@@__global_ldflags@@|$ldflags|g" \
-i SConstruct
# force building ntl_wrap.cpp with gcc otherwise other
# modules will not find mangled symbols.
CXX=gcc UNAME=Linux SAGE64=auto scons
ln -s libcsage.so.0 libcsage.so
popd
pushd src/sage/libs/mpmath
dos2unix ext_impl.pxd ext_libmp.pyx ext_main.pxd ext_main.pyx
# Save and update environment to generate bundled interfaces
save_PATH=$PATH
save_LOCAL=$SAGE_LOCAL
export PATH=%{_builddir}/bin:$PATH
export SAGE_LOCAL=%{_builddir}
%if %{with bundled_pari}
# Build bundled pari-2.8
pushd build/pkgs/pari/src
./Configure --prefix=%{_builddir} \
--without-readline --with-gmp \
--kernel=gmp --graphic=none
sed -i 's|%{_builddir}|%{_prefix}|g' Olinux-*/paricfg.h
make %{?_smp_mflags} gp
make install DESTDIR=""
cp -p src/language/anal.h %{_builddir}/include/pari/anal.h
popd
%endif
# Generate pari interface
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
%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}
python ./setup.py build
%__python2 ./setup.py build
popd
#------------------------------------------------------------------------
@ -740,13 +765,17 @@ pushd build/pkgs/rubiks/src
make %{?_smp_mflags} CC="gcc -fPIC" CXX="g++ -fPIC" CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
popd
%if 1
# Remove buildroot reference from cython comments
perl -pi -e 's|%{buildroot}||g;' `find src/build/cythonized -type f`
# Try hard to remove buildroot from binaries
rm -f `grep -lr "%{buildroot}" src/build/lib.linux-*/`
rm -f `grep -lr "%{buildroot}" src/build/temp.linux-*/`
pushd src
python ./setup.py build
%__python2 ./setup.py build
popd
%endif
# last build command
rm -fr $DOT_SAGE
@ -756,12 +785,17 @@ rm -fr $DOT_SAGE
export CC=%{__cc}
export SAGE_ROOT=%{buildroot}%{SAGE_ROOT}
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_ETC=%{buildroot}%{SAGE_ETC}
export SAGE_EXTCODE=%{buildroot}%{SAGE_ETC}
export SAGE_DOC=%{buildroot}%{SAGE_DOC}
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 DOT_SAGE=/tmp/sage$$
mkdir -p $DOT_SAGE/tmp
@ -774,17 +808,15 @@ mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_libdir}
mkdir -p $SAGE_PYTHONPATH
rm -fr $SAGE_LOCAL/{include,lib,share,notebook}
mkdir -p $SAGE_SHARE $SAGE_DOC $SAGE_LOCAL/bin $SAGE_SRC
ln -sf $PWD/src/sage $SAGE_SRC/sage
mkdir -p $SAGE_SHARE $SAGE_DOC $SAGE_LOCAL/bin %{buildroot}%{SAGE_SRC}
ln -sf $PWD/src/sage %{buildroot}%{SAGE_SRC}/sage
ln -sf %{_libdir} $SAGE_LOCAL/lib
ln -sf %{_includedir} $SAGE_LOCAL/include
ln -sf %{_datadir} $SAGE_LOCAL/share
#------------------------------------------------------------------------
pushd src
python setup.py install --root=%{buildroot}
cp -fa c_lib/libcsage.so.0 %{buildroot}%{_libdir}
ln -sf libcsage.so.0 %{buildroot}%{_libdir}/libcsage.so
%__python2 -u setup.py install --root=%{buildroot}
%if %{with docs}
# install documentation sources
rm -fr $SAGE_DOC/{common,en,fr}
@ -792,10 +824,17 @@ pushd src
%endif
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}
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
ln -sf %{_jsdir}/jsmol $SAGE_SHARE/jsmol
# sage3d
@ -818,7 +857,10 @@ pushd src/bin
cp -fa sage-* $SAGE_LOCAL/bin
pushd $SAGE_LOCAL/bin
ln -sf %{_bindir}/python sage.bin
ln -sf %{_bindir}/python python
%if %{without bundled_pari}
ln -sf %{_bindir}/gp sage_pari
%endif
ln -sf %{_bindir}/gap gap_stamp
ln -sf %{_bindir}/gmp-ecm ecm
popd
@ -908,12 +950,11 @@ pushd src/ext
mkdir -p $SAGE_ETC
for dir in \
gap \
graphs \
images \
magma \
maxima \
mwrank \
singular \
sobj; do
notebook-ipython; do
COUNT=`find $dir -type f | wc -l `
if [ $COUNT -gt 0 ]; then
cp -far $dir $SAGE_ETC
@ -937,7 +978,7 @@ popd
#------------------------------------------------------------------------
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} \
%{buildroot}%{_datadir}/texmf/tex/generic/sagetex/makecmds.sty
mv %{buildroot}%{_docdir}/{sagetex,%{sagetex_pkg}}
@ -959,8 +1000,9 @@ export SAGE_TESTDIR=\$DOT_SAGE/tmp
export SAGE_ROOT="$SAGE_ROOT"
export SAGE_LOCAL="$SAGE_LOCAL"
export SAGE_SHARE="$SAGE_SHARE"
export SAGE_EXTCODE="$SAGE_ETC"
export SAGE_ETC="$SAGE_ETC"
export SAGE_SRC="$SAGE_SRC"
export SAGE_SRC="%{buildroot}%{SAGE_SRC}"
##export SAGE_DOC="$SAGE_DOC"
module load 4ti2-%{_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 LC_MESSAGES=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 "\$@"
EOF
#------------------------------------------------------------------------
@ -995,9 +1040,6 @@ chmod +x %{buildroot}%{SAGE_LOCAL}/bin/sage3d
# o install csage headers
# o install .pxi and .pxd files
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
install -p -D -m 0644 $f %{buildroot}%{python_sitearch}/$f
done
@ -1016,7 +1058,7 @@ pushd src/doc
export PATH=%{buildroot}%{_bindir}:$SAGE_LOCAL/bin:$PATH
export SINGULARPATH=%{_libdir}/Singular/LIB
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
%if %{with sphinx_hack}
@ -1026,13 +1068,23 @@ pushd src/doc
%endif
# there we go
ln -sf %{buildroot}%{SAGE_DOC} $SAGE_SRC/doc
LANGUAGES="ca de en fr hu it pt ru tr" python common/builder.py -k all html
ln -sf %{buildroot}%{SAGE_DOC} %{buildroot}%{SAGE_SRC}/doc
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}
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
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
%if %{with check}
@ -1120,9 +1172,68 @@ rm %{buildroot}%{python_sitearch}/sagenb/translations/*/LC_MESSAGES/*.po
rm -r %{buildroot}%{python_sitearch}/sagenb/data/sage3d
%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
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
rm -fr $DOT_SAGE
@ -1155,6 +1266,10 @@ exit 0
%{SAGE_LOCAL}/bin/QuadraticSieve
%{SAGE_LOCAL}/bin/ecm
%{SAGE_LOCAL}/bin/gap_stamp
%if %{with bundled_pari}
%{SAGE_LOCAL}/bin/gp*
%endif
%{SAGE_LOCAL}/bin/python
%{SAGE_LOCAL}/bin/sage*
%{SAGE_LOCAL}/include
%{SAGE_LOCAL}/lib
@ -1163,7 +1278,9 @@ exit 0
%{SAGE_ROOT}/devel
%{SAGE_ROOT}/share
%dir %{SAGE_SRC}
%if %{with docs}
%{SAGE_SRC}/doc
%endif
%{SAGE_SRC}/sage
%dir %{SAGE_PYTHONPATH}
# MIT
@ -1172,11 +1289,15 @@ exit 0
%{_bindir}/sage
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%if %{with bundled_pari}
%{SAGE_ROOT}/lib
%{SAGE_LOCAL}/pari.desc
%endif
%{SAGE_SPKG_INST}
#------------------------------------------------------------------------
%files core
# GPLv2+
%{_libdir}/libcsage.so.*
%{python_sitearch}/sage
%{python_sitearch}/sage-*.egg-info
@ -1202,15 +1323,17 @@ exit 0
%files data-etc
# GPLv2+
%{SAGE_ETC}/gap
#%#{SAGE_ETC}/graphs
%{SAGE_ETC}/images
%{SAGE_ETC}/magma
%{SAGE_ETC}/maxima
%{SAGE_ETC}/mwrank
#%#{SAGE_ETC}/notebook-ipython
%{SAGE_ETC}/pari
#------------------------------------------------------------------------
%files data-graphs
# GPLv2+
%{SAGE_ETC}/graphs
%{SAGE_SHARE}/graphs
#------------------------------------------------------------------------
@ -1218,12 +1341,6 @@ exit 0
# GPL+
%{SAGE_SHARE}/reflexive_polytopes
#------------------------------------------------------------------------
%files devel
# GPLv2+
%{_includedir}/csage
%{_libdir}/libcsage.so
%if %{with docs}
#------------------------------------------------------------------------
%files doc
@ -1291,6 +1408,7 @@ exit 0
#------------------------------------------------------------------------
%files notebook
%{SAGE_ETC}/notebook-ipython
# GPLv2+
%{SAGE_SRC}/sagenb
%dir %{python_sitearch}/sagenb
@ -1376,6 +1494,11 @@ exit 0
########################################################################
%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
- Rebuild for ntl 9.6.2

View file

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