From 056e08d02331cc2d69f3cda3c8657ef65d2247c3 Mon Sep 17 00:00:00 2001 From: pcpa Date: Thu, 6 Apr 2017 08:02:52 -0400 Subject: [PATCH] Update to sagemath 7.5.1 --- .gitignore | 1 + sagemath-4ti2.patch | 6 +- sagemath-arb.patch | 60 +++++++++++++++ sagemath-atlas.patch | 31 ++++---- sagemath-extensions.patch | 45 ++++------- sagemath-fes-build.patch | 6 +- sagemath-fes.patch | 6 +- sagemath-ftbfs.patch | 28 ------- sagemath-gcc6.patch | 6 +- sagemath-givaro.patch | 6 +- sagemath-includes.patch | 137 +++++++++++++-------------------- sagemath-libgap.patch | 15 ++-- sagemath-lrslib.patch | 6 +- sagemath-nauty.patch | 6 +- sagemath-nofstring.patch | 20 ++--- sagemath-ntl.patch | 16 ++-- sagemath-pari.patch | 95 +++++------------------ sagemath-readonly.patch | 6 +- sagemath-rpmbuild.patch | 105 +++++++++++++++---------- sagemath-sagedoc.patch | 67 ++++++---------- sagemath-scripts.patch | 156 ++++++++++++++++++++++++-------------- sagemath-singular.patch | 35 +++++++++ sagemath.spec | 59 ++++++++++---- sources | 2 +- 24 files changed, 481 insertions(+), 439 deletions(-) delete mode 100644 sagemath-ftbfs.patch create mode 100644 sagemath-singular.patch diff --git a/.gitignore b/.gitignore index 9990a19..fa2f8ad 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /sage-6.8.tar.gz /sage-7.3.tar.gz /sage-7.4.tar.gz +/sage-7.5.1.tar.gz diff --git a/sagemath-4ti2.patch b/sagemath-4ti2.patch index 864176c..a4afb86 100644 --- a/sagemath-4ti2.patch +++ b/sagemath-4ti2.patch @@ -1,6 +1,6 @@ diff -up src/sage/sandpiles/sandpile.py.orig src/sage/sandpiles/sandpile.py ---- src/sage/sandpiles/sandpile.py.orig 2016-10-20 08:05:08.805531352 -0400 -+++ src/sage/sandpiles/sandpile.py 2016-10-20 08:05:17.107531669 -0400 +--- src/sage/sandpiles/sandpile.py.orig 2017-03-04 13:25:45.385473644 -0500 ++++ src/sage/sandpiles/sandpile.py 2017-03-04 13:25:53.872473969 -0500 @@ -346,9 +346,6 @@ from sage.arith.all import falling_facto from sage.rings.all import Integer, PolynomialRing, QQ, ZZ from sage.symbolic.all import I, pi @@ -11,7 +11,7 @@ diff -up src/sage/sandpiles/sandpile.py.orig src/sage/sandpiles/sandpile.py class Sandpile(DiGraph): """ Class for Dhar's abelian sandpile model. -@@ -5203,7 +5200,7 @@ class SandpileDivisor(dict): +@@ -5197,7 +5194,7 @@ class SandpileDivisor(dict): sign_file.close() # compute try: diff --git a/sagemath-arb.patch b/sagemath-arb.patch index 28a53de..7649f4a 100644 --- a/sagemath-arb.patch +++ b/sagemath-arb.patch @@ -91,3 +91,63 @@ diff -up src/sage/libs/arb/bernoulli.pxd.orig src/sage/libs/arb/bernoulli.pxd -cdef extern from "bernoulli.h": +cdef extern from "arb/bernoulli.h": void bernoulli_fmpq_ui(fmpq_t b, ulong n) +diff -up src/sage/libs/arb/acb_poly.pxd.orig src/sage/libs/arb/acb_poly.pxd +--- src/sage/libs/arb/acb_poly.pxd.orig 2017-03-29 18:10:08.675927202 -0400 ++++ src/sage/libs/arb/acb_poly.pxd 2017-03-29 18:10:13.934927403 -0400 +@@ -3,7 +3,7 @@ + from sage.libs.arb.types cimport * + from sage.libs.flint.types cimport fmpz_poly_t, fmpq_poly_t + +-cdef extern from "acb_poly.h": ++cdef extern from "arb/acb_poly.h": + void acb_poly_init(acb_poly_t poly) + void acb_poly_clear(acb_poly_t poly) + void acb_poly_fit_length(acb_poly_t poly, long len) +diff -up src/sage/libs/arb/types.pxd.orig src/sage/libs/arb/types.pxd +--- src/sage/libs/arb/types.pxd.orig 2017-03-29 18:08:42.979923920 -0400 ++++ src/sage/libs/arb/types.pxd 2017-03-29 18:09:18.413925277 -0400 +@@ -1,4 +1,4 @@ +-cdef extern from "mag.h": ++cdef extern from "arb/mag.h": + ctypedef struct mag_struct: + pass + ctypedef mag_struct mag_t[1] +@@ -6,7 +6,7 @@ cdef extern from "mag.h": + ctypedef const mag_struct * mag_srcptr + long MAG_BITS + +-cdef extern from "arf.h": ++cdef extern from "arb/arf.h": + ctypedef struct arf_struct: + pass + ctypedef arf_struct arf_t[1] +@@ -20,25 +20,25 @@ cdef extern from "arf.h": + ARF_RND_NEAR + long ARF_PREC_EXACT + +-cdef extern from "arb.h": ++cdef extern from "arb/arb.h": + ctypedef struct arb_struct: + pass + ctypedef arb_struct arb_t[1] + ctypedef arb_struct * arb_ptr + +-cdef extern from "acb.h": ++cdef extern from "arb/acb.h": + ctypedef struct acb_struct: + pass + ctypedef acb_struct[1] acb_t + ctypedef acb_struct * acb_ptr + ctypedef const acb_struct * acb_srcptr + +-cdef extern from "acb_mat.h": ++cdef extern from "arb/acb_mat.h": + ctypedef struct acb_mat_struct: + pass + ctypedef acb_mat_struct[1] acb_mat_t + +-cdef extern from "acb_poly.h": ++cdef extern from "arb/acb_poly.h": + ctypedef struct acb_poly_struct: + pass + ctypedef acb_poly_struct[1] acb_poly_t diff --git a/sagemath-atlas.patch b/sagemath-atlas.patch index 8e83e40..b2dd2d4 100644 --- a/sagemath-atlas.patch +++ b/sagemath-atlas.patch @@ -1,15 +1,15 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2016-10-20 09:16:23.105695029 -0400 -+++ src/module_list.py 2016-10-20 09:17:17.868697126 -0400 +--- src/module_list.py.orig 2017-03-29 19:33:34.149118879 -0400 ++++ src/module_list.py 2017-03-29 19:34:09.520120233 -0400 @@ -12,20 +12,14 @@ SAGE_INC = '/usr/include' import pkgconfig # CBLAS can be one of multiple implementations -cblas_pc = pkgconfig.parse('cblas') +cblas_pc = pkgconfig.parse('atlas') - cblas_libs = list(cblas_pc['libraries']) - cblas_library_dirs = list(cblas_pc['library_dirs']) - cblas_include_dirs = list(cblas_pc['include_dirs']) + cblas_libs = cblas_pc['libraries'] + cblas_library_dirs = cblas_pc['library_dirs'] + cblas_include_dirs = cblas_pc['include_dirs'] -# TODO: Remove Cygwin hack by installing a suitable cblas.pc -if os.path.exists('/usr/lib/libblas.dll.a'): @@ -17,27 +17,28 @@ diff -up src/module_list.py.orig src/module_list.py - -# LAPACK can be one of multiple implementations -lapack_pc = pkgconfig.parse('lapack') --lapack_libs = list(lapack_pc['libraries']) --lapack_library_dirs = list(lapack_pc['library_dirs']) --lapack_include_dirs = list(lapack_pc['include_dirs']) +-lapack_libs = lapack_pc['libraries'] +-lapack_library_dirs = lapack_pc['library_dirs'] +-lapack_include_dirs = lapack_pc['include_dirs'] +lapack_libs = [ 'lapack' ] +lapack_library_dirs = [] +lapack_include_dirs = [ SAGE_INC + '/lapack' ] # FFLAS-FFPACK fflas_ffpack_pc = pkgconfig.parse('fflas-ffpack') -@@ -43,7 +37,7 @@ givaro_cflags = pkgconfig.cflags('givaro - # Note we replace the built-in gslcblas with the above cblas +@@ -45,7 +39,8 @@ givaro_cflags = pkgconfig.cflags('givaro gsl_pc = pkgconfig.parse('gsl') - gsl_libs = list(gsl_pc['libraries'].difference(['gslcblas']).union(cblas_libs)) --gsl_library_dirs = list(gsl_pc['library_dirs']) + gsl_libs = gsl_pc['libraries'] + gsl_libs.remove('gslcblas') +-gsl_library_dirs = gsl_pc['library_dirs'] ++gsl_libs.extend(cblas_libs) +gsl_library_dirs = list(cblas_pc['library_dirs']) - gsl_include_dirs = list(gsl_pc['include_dirs']) + gsl_include_dirs = gsl_pc['include_dirs'] # GD image library diff -up src/sage/misc/cython.py.orig src/sage/misc/cython.py ---- src/sage/misc/cython.py.orig 2016-10-20 09:17:25.057697402 -0400 -+++ src/sage/misc/cython.py 2016-10-20 09:17:43.339698102 -0400 +--- src/sage/misc/cython.py.orig 2017-03-29 19:33:27.181118612 -0400 ++++ src/sage/misc/cython.py 2017-03-29 19:33:36.568118971 -0400 @@ -30,15 +30,11 @@ import pkgconfig diff --git a/sagemath-extensions.patch b/sagemath-extensions.patch index 4f34627..affd680 100644 --- a/sagemath-extensions.patch +++ b/sagemath-extensions.patch @@ -1,7 +1,7 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2016-10-20 07:59:58.978519487 -0400 -+++ src/module_list.py 2016-10-20 08:00:12.330519999 -0400 -@@ -167,7 +167,6 @@ library_order["stdc++"] = 1000 +--- src/module_list.py.orig 2017-03-04 13:10:19.482438188 -0500 ++++ src/module_list.py 2017-03-04 13:13:17.345444999 -0500 +@@ -166,7 +166,6 @@ library_order["stdc++"] = 1000 ### ############################################################# @@ -9,8 +9,8 @@ diff -up src/module_list.py.orig src/module_list.py UNAME = os.uname() def uname_specific(name, value, alternative): -@@ -398,21 +397,21 @@ ext_modules = [ - libraries = ['flint'], +@@ -382,21 +381,21 @@ ext_modules = [ + sources = ['sage/graphs/matchpoly.pyx'], extra_compile_args = ['-std=c99']), - OptionalExtension("sage.graphs.mcqd", @@ -46,7 +46,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.graphs.planarity', sources = ['sage/graphs/planarity.pyx'], -@@ -431,10 +430,10 @@ ext_modules = [ +@@ -415,10 +414,10 @@ ext_modules = [ Extension('sage.graphs.graph_decompositions.cutwidth', sources = ['sage/graphs/graph_decompositions/cutwidth.pyx']), @@ -61,7 +61,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.graphs.spanning_tree', sources = ['sage/graphs/spanning_tree.pyx']), -@@ -573,18 +572,18 @@ ext_modules = [ +@@ -545,18 +544,18 @@ ext_modules = [ ## ################################ @@ -87,9 +87,9 @@ diff -up src/module_list.py.orig src/module_list.py ["sage/libs/fes.pyx"], language = "c", libraries = ['fes'], -@@ -614,17 +613,17 @@ ext_modules = [ - Extension('sage.libs.gmp.rational_reconstruction', - sources = ['sage/libs/gmp/rational_reconstruction.pyx']), +@@ -580,17 +579,17 @@ ext_modules = [ + Extension('sage.libs.gmp.pylong', + sources = ['sage/libs/gmp/pylong.pyx']), - OptionalExtension('sage.libs.braiding', - sources = ["sage/libs/braiding.pyx"], @@ -112,9 +112,9 @@ diff -up src/module_list.py.orig src/module_list.py +# libraries = ["homfly", "gc"], +# package="libhomfly"), - # Extension('sage.libs.linbox.linbox', - # sources = ['sage/libs/linbox/linbox.pyx']), -@@ -997,10 +996,10 @@ ext_modules = [ + Extension('*', ['sage/libs/linbox/*.pyx']), + +@@ -917,10 +916,10 @@ ext_modules = [ Extension('sage.matrix.matrix_window', sources = ['sage/matrix/matrix_window.pyx']), @@ -129,20 +129,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.matrix.misc', sources = ['sage/matrix/misc.pyx'], -@@ -1033,12 +1032,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'], -- condition = (UNAME[0] == "Darwin" and not UNAME[2].startswith('8.'))), -- - ################################ - ## - ## sage.modular -@@ -1190,19 +1183,19 @@ ext_modules = [ +@@ -1099,19 +1098,19 @@ ext_modules = [ Extension("sage.numerical.backends.interactivelp_backend", ["sage/numerical/backends/interactivelp_backend.pyx"]), @@ -174,7 +161,7 @@ diff -up src/module_list.py.orig src/module_list.py ["sage/numerical/backends/coin_backend.pyx"], language = 'c++', libraries = ["Cbc", "CbcSolver", "Cgl", "Clp", "CoinUtils", -@@ -1681,7 +1674,7 @@ ext_modules = [ +@@ -1583,7 +1582,7 @@ ext_modules = [ ## ################################ @@ -183,7 +170,7 @@ diff -up src/module_list.py.orig src/module_list.py sources = ["sage/sat/solvers/cryptominisat/cryptominisat.pyx"], include_dirs = [os.path.join(SAGE_INC, "cmsat")] + zlib_include_dirs, language = "c++", -@@ -1689,7 +1682,7 @@ ext_modules = [ +@@ -1591,7 +1590,7 @@ ext_modules = [ library_dirs = zlib_library_dirs, package = 'cryptominisat'), diff --git a/sagemath-fes-build.patch b/sagemath-fes-build.patch index b12e363..fe118b2 100644 --- a/sagemath-fes-build.patch +++ b/sagemath-fes-build.patch @@ -1,7 +1,7 @@ diff -up src/sage/libs/fes.pyx.orig src/sage/libs/fes.pyx ---- src/sage/libs/fes.pyx.orig 2016-08-08 13:44:21.919554511 -0400 -+++ src/sage/libs/fes.pyx 2016-08-08 13:44:36.618555074 -0400 -@@ -90,8 +90,8 @@ from sage.rings.polynomial.pbori import +--- src/sage/libs/fes.pyx.orig 2017-03-04 13:32:40.457489539 -0500 ++++ src/sage/libs/fes.pyx 2017-03-04 13:32:50.717489932 -0500 +@@ -84,8 +84,8 @@ from sage.rings.polynomial.pbori import from sage.arith.all import binomial from sage.combinat.subset import Subsets diff --git a/sagemath-fes.patch b/sagemath-fes.patch index 2810445..fe314ac 100644 --- a/sagemath-fes.patch +++ b/sagemath-fes.patch @@ -1,7 +1,7 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2016-10-20 08:12:42.137548711 -0400 -+++ src/module_list.py 2016-10-20 08:12:55.836549236 -0400 -@@ -583,11 +583,11 @@ ext_modules = [ +--- src/module_list.py.orig 2017-03-04 13:33:14.446490840 -0500 ++++ src/module_list.py 2017-03-04 13:33:23.046491170 -0500 +@@ -555,11 +555,11 @@ ext_modules = [ sources = ["sage/libs/ecl.pyx"], libraries = ["ecl"]), diff --git a/sagemath-ftbfs.patch b/sagemath-ftbfs.patch deleted file mode 100644 index 2b61f1c..0000000 --- a/sagemath-ftbfs.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2016-12-21 12:24:59.301116425 -0500 -+++ src/module_list.py 2016-12-21 12:25:33.927117751 -0500 -@@ -36,7 +36,7 @@ givaro_cflags = pkgconfig.cflags('givaro - # GNU Scientific Library - # Note we replace the built-in gslcblas with the above cblas - gsl_pc = pkgconfig.parse('gsl') --gsl_libs = list(gsl_pc['libraries'].difference(['gslcblas']).union(cblas_libs)) -+gsl_libs = list(set(gsl_pc['libraries']).difference(['gslcblas']).union(cblas_libs)) - gsl_library_dirs = list(cblas_pc['library_dirs']) - gsl_include_dirs = list(gsl_pc['include_dirs']) - -diff -up src/setup.py.orig src/setup.py ---- src/setup.py.orig 2016-12-21 12:26:52.909120775 -0500 -+++ src/setup.py 2016-12-21 12:27:00.759121076 -0500 -@@ -565,9 +565,9 @@ def run_cythonize(): - - # Sage uses these directives (mostly for historical reasons). - Cython.Compiler.Options.embed_pos_in_docstring = True -- Cython.Compiler.Options.directive_defaults['autotestdict'] = False -- Cython.Compiler.Options.directive_defaults['cdivision'] = True -- Cython.Compiler.Options.directive_defaults['fast_getattr'] = True -+ Cython.Compiler.Options._directive_defaults['autotestdict'] = False -+ Cython.Compiler.Options._directive_defaults['cdivision'] = True -+ Cython.Compiler.Options._directive_defaults['fast_getattr'] = True - # The globals() builtin in Cython was fixed to return to the current scope, - # but Sage relies on the broken behavior of returning to the nearest - # enclosing Python scope (e.g. to perform variable injection). diff --git a/sagemath-gcc6.patch b/sagemath-gcc6.patch index 1dbaade..67aa0d2 100644 --- a/sagemath-gcc6.patch +++ b/sagemath-gcc6.patch @@ -1,7 +1,7 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2016-10-20 08:30:33.400589734 -0400 -+++ src/module_list.py 2016-10-20 08:32:10.570593455 -0400 -@@ -964,7 +964,7 @@ ext_modules = [ +--- src/module_list.py.orig 2017-03-29 18:45:52.972009314 -0400 ++++ src/module_list.py 2017-03-29 18:46:02.855009693 -0400 +@@ -880,7 +880,7 @@ ext_modules = [ library_dirs = m4ri_library_dirs, include_dirs = m4ri_include_dirs, depends = [SAGE_INC + "/m4rie/m4rie.h"], diff --git a/sagemath-givaro.patch b/sagemath-givaro.patch index 9b50de5..c4c9a42 100644 --- a/sagemath-givaro.patch +++ b/sagemath-givaro.patch @@ -1,7 +1,7 @@ diff -up src/sage/libs/singular/singular.pyx.orig src/sage/libs/singular/singular.pyx ---- src/sage/libs/singular/singular.pyx.orig 2016-10-20 08:19:08.767563517 -0400 -+++ src/sage/libs/singular/singular.pyx 2016-10-20 08:19:15.138563761 -0400 -@@ -21,6 +21,8 @@ cdef extern from "limits.h": +--- src/sage/libs/singular/singular.pyx.orig 2017-03-04 13:34:53.241494624 -0500 ++++ src/sage/libs/singular/singular.pyx 2017-03-04 13:35:03.289495008 -0500 +@@ -23,6 +23,8 @@ cdef extern from "limits.h": long INT_MAX long INT_MIN diff --git a/sagemath-includes.patch b/sagemath-includes.patch index 6102b74..acdc559 100644 --- a/sagemath-includes.patch +++ b/sagemath-includes.patch @@ -1,35 +1,25 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2016-10-20 08:21:43.948569459 -0400 -+++ src/module_list.py 2016-10-20 08:28:34.226585170 -0400 -@@ -116,6 +116,7 @@ except ValueError: - ######################################################### - - singular_libs = ['singular', 'flint', 'ntl', 'gmpxx', 'gmp', 'readline', 'm'] +--- src/module_list.py.orig 2017-03-29 18:42:35.820001764 -0400 ++++ src/module_list.py 2017-03-29 18:43:56.158004841 -0400 +@@ -63,6 +63,7 @@ linbox_cflags = pkgconfig.cflags('linbox + # Singular + singular_pc = pkgconfig.parse('Singular') + singular_libs = singular_pc['libraries'] +singular_incs = [SAGE_INC + '/singular', SAGE_INC + '/factory'] + singular_library_dirs = singular_pc['library_dirs'] + singular_cflags = pkgconfig.cflags('Singular').split() - ######################################################### - ### Library order -@@ -192,16 +193,19 @@ ext_modules = [ - Extension('sage.algebras.letterplace.free_algebra_letterplace', - sources = ['sage/algebras/letterplace/free_algebra_letterplace.pyx'], - libraries = singular_libs, -+ include_dirs = singular_incs, - language="c++"), +@@ -188,7 +189,8 @@ ext_modules = [ + language='c++', + libraries = ["gmp", "m", "ntl"]), - Extension('sage.algebras.letterplace.free_algebra_element_letterplace', - sources = ['sage/algebras/letterplace/free_algebra_element_letterplace.pyx'], - libraries = singular_libs, -+ include_dirs = singular_incs, - language="c++"), - - Extension('sage.algebras.letterplace.letterplace_ideal', - sources = ['sage/algebras/letterplace/letterplace_ideal.pyx'], - libraries = singular_libs, -+ include_dirs = singular_incs, - language="c++"), +- Extension('*', sources = ['sage/algebras/letterplace/*.pyx']), ++ Extension('*', sources = ['sage/algebras/letterplace/*.pyx'], ++ include_dirs = singular_incs), Extension('sage.algebras.quatalg.quaternion_algebra_cython', -@@ -644,7 +648,8 @@ ext_modules = [ + sources = ['sage/algebras/quatalg/quaternion_algebra_cython.pyx'], +@@ -607,7 +609,8 @@ ext_modules = [ [])), Extension('sage.libs.lrcalc.lrcalc', @@ -37,47 +27,19 @@ diff -up src/module_list.py.orig src/module_list.py + sources = ["sage/libs/lrcalc/lrcalc.pyx"], + include_dirs = [os.path.join(SAGE_INC, 'lrcalc')]), - Extension('sage.libs.pari.closure', - sources = ["sage/libs/pari/closure.pyx"]), -@@ -677,31 +682,37 @@ ext_modules = [ - Extension('sage.libs.singular.singular', - sources = ['sage/libs/singular/singular.pyx'], - libraries = singular_libs, -+ include_dirs = singular_incs, - language="c++"), + Extension('*', ['sage/libs/cypari2/*.pyx']), + Extension('*', ['sage/libs/pari/*.pyx']), +@@ -625,7 +628,8 @@ ext_modules = [ + sources = ['sage/libs/readline.pyx'], + libraries = ['readline']), - Extension('sage.libs.singular.polynomial', - sources = ['sage/libs/singular/polynomial.pyx'], - libraries = singular_libs, -+ include_dirs = singular_incs, - language="c++"), - - Extension('sage.libs.singular.ring', - sources = ['sage/libs/singular/ring.pyx'], - libraries = singular_libs, -+ include_dirs = singular_incs, - language="c++"), - - Extension('sage.libs.singular.groebner_strategy', - sources = ['sage/libs/singular/groebner_strategy.pyx'], - libraries = singular_libs, -+ include_dirs = singular_incs, - language="c++"), - - Extension('sage.libs.singular.function', - sources = ['sage/libs/singular/function.pyx'], - libraries = singular_libs, -+ include_dirs = singular_incs, - language="c++"), - - Extension('sage.libs.singular.option', - sources = ['sage/libs/singular/option.pyx'], - libraries = singular_libs, -+ include_dirs = singular_incs, - language="c++"), +- Extension('*', sources = ['sage/libs/singular/*.pyx']), ++ Extension('*', sources = ['sage/libs/singular/*.pyx'], ++ include_dirs = singular_incs), Extension('sage.libs.symmetrica.symmetrica', -@@ -710,17 +721,21 @@ ext_modules = [ + sources = ["sage/libs/symmetrica/symmetrica.pyx"], +@@ -633,17 +637,21 @@ ext_modules = [ Extension('sage.libs.mpmath.utils', sources = ["sage/libs/mpmath/utils.pyx"], @@ -103,7 +65,7 @@ diff -up src/module_list.py.orig src/module_list.py ################################### ## -@@ -728,7 +743,8 @@ ext_modules = [ +@@ -651,7 +659,8 @@ ext_modules = [ ## ################################### @@ -113,24 +75,23 @@ diff -up src/module_list.py.orig src/module_list.py ################################### ## -@@ -901,7 +917,7 @@ ext_modules = [ +@@ -824,6 +833,7 @@ ext_modules = [ Extension("sage.matrix.matrix_complex_ball_dense", ["sage/matrix/matrix_complex_ball_dense.pyx"], libraries=['arb', 'mpfi', 'mpfr'], -- include_dirs=[SAGE_INC + '/flint'], + include_dirs=[SAGE_INC + '/flint', SAGE_INC + '/arb'], language = "c++"), Extension('sage.matrix.matrix_complex_double_dense', -@@ -971,6 +987,7 @@ ext_modules = [ +@@ -891,6 +901,7 @@ ext_modules = [ + sources = ['sage/matrix/matrix_modn_sparse.pyx']), + Extension('sage.matrix.matrix_mpolynomial_dense', - sources = ['sage/matrix/matrix_mpolynomial_dense.pyx'], - libraries = singular_libs, + include_dirs = singular_incs, - language="c++"), + sources = ['sage/matrix/matrix_mpolynomial_dense.pyx']), Extension('sage.matrix.matrix_rational_dense', -@@ -1288,6 +1305,7 @@ ext_modules = [ +@@ -1203,6 +1214,7 @@ ext_modules = [ Extension("sage.rings.complex_arb", ["sage/rings/complex_arb.pyx"], libraries=['mpfi', 'mpfr', 'gmp'], @@ -138,7 +99,7 @@ diff -up src/module_list.py.orig src/module_list.py language = 'c++'), Extension('sage.rings.complex_double', -@@ -1360,6 +1378,7 @@ ext_modules = [ +@@ -1275,6 +1287,7 @@ ext_modules = [ Extension("sage.rings.real_arb", ["sage/rings/real_arb.pyx"], libraries = ['mpfi', 'mpfr'], @@ -146,30 +107,34 @@ diff -up src/module_list.py.orig src/module_list.py language = 'c++'), Extension('sage.rings.real_lazy', -@@ -1564,16 +1583,19 @@ ext_modules = [ +@@ -1473,12 +1486,15 @@ ext_modules = [ + sources = ['sage/rings/polynomial/multi_polynomial.pyx']), + Extension('sage.rings.polynomial.multi_polynomial_ideal_libsingular', - sources = ['sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx'], - libraries = singular_libs, + include_dirs = singular_incs, - language="c++"), + sources = ['sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx']), Extension('sage.rings.polynomial.plural', - sources = ['sage/rings/polynomial/plural.pyx'], - libraries = ['m', 'readline', 'singular', 'givaro', 'gmpxx', 'gmp'], + include_dirs = singular_incs, - language="c++"), + sources = ['sage/rings/polynomial/plural.pyx']), Extension('sage.rings.polynomial.multi_polynomial_libsingular', - sources = ['sage/rings/polynomial/multi_polynomial_libsingular.pyx'], - libraries = singular_libs, + include_dirs = singular_incs, - language="c++"), + sources = ['sage/rings/polynomial/multi_polynomial_libsingular.pyx']), Extension('sage.rings.polynomial.multi_polynomial_ring_generic', +@@ -1492,6 +1508,7 @@ ext_modules = [ + + Extension('sage.rings.polynomial.polynomial_complex_arb', + sources = ['sage/rings/polynomial/polynomial_complex_arb.pyx'], ++ include_dirs=[SAGE_INC + '/flint', SAGE_INC + '/arb'], + language="c++"), + + Extension('sage.rings.polynomial.polynomial_compiled', diff -up src/setup.py.orig src/setup.py ---- src/setup.py.orig 2016-10-20 08:28:56.912586039 -0400 -+++ src/setup.py 2016-10-20 08:29:26.634587177 -0400 -@@ -78,6 +78,7 @@ except KeyError: +--- src/setup.py.orig 2017-03-29 18:42:34.196001702 -0400 ++++ src/setup.py 2017-03-29 18:42:39.088001890 -0400 +@@ -83,6 +83,7 @@ except KeyError: # search for dependencies and add to gcc -I # this depends on SAGE_CYTHONIZED include_dirs = sage_include_directories(use_sources=True) diff --git a/sagemath-libgap.patch b/sagemath-libgap.patch index 3ffe5c0..0db4199 100644 --- a/sagemath-libgap.patch +++ b/sagemath-libgap.patch @@ -1,6 +1,6 @@ diff -up src/sage/libs/gap/test/main.c.orig src/sage/libs/gap/test/main.c ---- src/sage/libs/gap/test/main.c.orig 2016-08-08 13:43:32.376552613 -0400 -+++ src/sage/libs/gap/test/main.c 2016-08-08 13:43:38.209552837 -0400 +--- src/sage/libs/gap/test/main.c.orig 2017-03-04 13:30:35.525484755 -0500 ++++ src/sage/libs/gap/test/main.c 2017-03-04 13:30:58.662485641 -0500 @@ -22,7 +22,7 @@ void eval(char* cmd) { libgap_start_interaction(cmd); @@ -11,9 +11,9 @@ diff -up src/sage/libs/gap/test/main.c.orig src/sage/libs/gap/test/main.c char* out = libgap_get_output(); libgap_exit(); diff -up src/sage/libs/gap/util.pyx.orig src/sage/libs/gap/util.pyx ---- src/sage/libs/gap/util.pyx.orig 2016-08-08 13:41:46.176548547 -0400 -+++ src/sage/libs/gap/util.pyx 2016-08-08 13:42:26.594550094 -0400 -@@ -154,18 +154,9 @@ def gap_root(): +--- src/sage/libs/gap/util.pyx.orig 2017-03-04 13:31:07.509485979 -0500 ++++ src/sage/libs/gap/util.pyx 2017-03-04 13:31:44.126487382 -0500 +@@ -154,17 +154,9 @@ def gap_root(): sage: from sage.libs.gap.util import gap_root sage: gap_root() # random output @@ -21,9 +21,8 @@ diff -up src/sage/libs/gap/util.pyx.orig src/sage/libs/gap/util.pyx + '/usr/lib/gap' """ - import os.path -- gapdir = os.path.join(SAGE_LOCAL, 'gap', 'latest') -- if os.path.exists(gapdir): -- return gapdir +- if os.path.exists(GAP_ROOT_DIR): +- return GAP_ROOT_DIR - print('The gap-4.5.5.spkg (or later) seems to be not installed!') - gap_sh = open(os.path.join(SAGE_LOCAL, 'bin', 'gap')).read().splitlines() - gapdir = filter(lambda dir:dir.strip().startswith('GAP_DIR'), gap_sh)[0] diff --git a/sagemath-lrslib.patch b/sagemath-lrslib.patch index c6eb3fa..f29c8cb 100644 --- a/sagemath-lrslib.patch +++ b/sagemath-lrslib.patch @@ -1,6 +1,6 @@ diff -up src/sage/geometry/polyhedron/base.py.orig src/sage/geometry/polyhedron/base.py ---- src/sage/geometry/polyhedron/base.py.orig 2016-08-08 13:38:11.144540312 -0400 -+++ src/sage/geometry/polyhedron/base.py 2016-08-08 13:38:26.707540908 -0400 +--- src/sage/geometry/polyhedron/base.py.orig 2017-03-04 13:27:41.267478082 -0500 ++++ src/sage/geometry/polyhedron/base.py 2017-03-04 13:27:49.646478403 -0500 @@ -21,7 +21,6 @@ import six from sage.structure.element import Element, coerce_binop, is_Vector @@ -9,7 +9,7 @@ diff -up src/sage/geometry/polyhedron/base.py.orig src/sage/geometry/polyhedron/ from sage.rings.all import QQ, ZZ from sage.rings.real_double import RDF -@@ -3691,10 +3690,6 @@ class Polyhedron_base(Element): +@@ -3680,10 +3679,6 @@ class Polyhedron_base(Element): David Avis's lrs program. """ diff --git a/sagemath-nauty.patch b/sagemath-nauty.patch index 939211a..5629cc0 100644 --- a/sagemath-nauty.patch +++ b/sagemath-nauty.patch @@ -1,7 +1,7 @@ diff -up src/sage/graphs/graph_generators.py.orig src/sage/graphs/graph_generators.py ---- src/sage/graphs/graph_generators.py.orig 2016-08-08 13:38:51.824541870 -0400 -+++ src/sage/graphs/graph_generators.py 2016-08-08 13:39:20.460542967 -0400 -@@ -872,7 +872,7 @@ class GraphGenerators(): +--- src/sage/graphs/graph_generators.py.orig 2017-03-04 13:28:37.640480240 -0500 ++++ src/sage/graphs/graph_generators.py 2017-03-04 13:28:47.287480610 -0500 +@@ -874,7 +874,7 @@ class GraphGenerators(): >A geng -d0D3 n=4 e=0-6 """ import subprocess diff --git a/sagemath-nofstring.patch b/sagemath-nofstring.patch index a9667f3..50fdd5a 100644 --- a/sagemath-nofstring.patch +++ b/sagemath-nofstring.patch @@ -1,6 +1,6 @@ diff -up src/sage/arith/multi_modular.pyx.orig src/sage/arith/multi_modular.pyx ---- src/sage/arith/multi_modular.pyx.orig 2016-10-20 08:20:20.321566257 -0400 -+++ src/sage/arith/multi_modular.pyx 2016-10-20 08:20:45.522567222 -0400 +--- src/sage/arith/multi_modular.pyx.orig 2017-03-04 13:36:01.148497224 -0500 ++++ src/sage/arith/multi_modular.pyx 2017-03-04 13:36:03.202497303 -0500 @@ -172,9 +172,9 @@ cdef class MultiModularBasis_base(object ArithmeticError: The inverse of 6 modulo 10 is not defined. """ @@ -23,8 +23,8 @@ diff -up src/sage/arith/multi_modular.pyx.orig src/sage/arith/multi_modular.pyx cdef Py_ssize_t i diff -up src/sage/rings/finite_rings/integer_mod.pyx.orig src/sage/rings/finite_rings/integer_mod.pyx ---- src/sage/rings/finite_rings/integer_mod.pyx.orig 2016-10-20 08:20:40.398567026 -0400 -+++ src/sage/rings/finite_rings/integer_mod.pyx 2016-10-20 08:20:45.526567222 -0400 +--- src/sage/rings/finite_rings/integer_mod.pyx.orig 2017-03-04 13:36:01.155497224 -0500 ++++ src/sage/rings/finite_rings/integer_mod.pyx 2017-03-04 13:36:03.204497303 -0500 @@ -392,7 +392,7 @@ cdef class IntegerMod_abstract(FiniteRin from integer_mod_ring import IntegerModRing R = IntegerModRing(modulus) @@ -35,9 +35,9 @@ diff -up src/sage/rings/finite_rings/integer_mod.pyx.orig src/sage/rings/finite_ def is_nilpotent(self): diff -up src/sage/structure/parent.pyx.orig src/sage/structure/parent.pyx ---- src/sage/structure/parent.pyx.orig 2016-10-20 08:20:20.325566257 -0400 -+++ src/sage/structure/parent.pyx 2016-10-20 08:20:45.529567222 -0400 -@@ -733,7 +733,7 @@ cdef class Parent(category_object.Catego +--- src/sage/structure/parent.pyx.orig 2017-03-04 13:35:36.771496290 -0500 ++++ src/sage/structure/parent.pyx 2017-03-04 13:36:03.205497303 -0500 +@@ -735,7 +735,7 @@ cdef class Parent(category_object.Catego cdef int init_coerce(self, bint warn=True) except -1: if self._coerce_from_hash is None: if warn: @@ -47,9 +47,9 @@ diff -up src/sage/structure/parent.pyx.orig src/sage/structure/parent.pyx self._initial_action_list = [] self._initial_convert_list = [] diff -up src/sage/symbolic/ring.pyx.orig src/sage/symbolic/ring.pyx ---- src/sage/symbolic/ring.pyx.orig 2016-10-20 08:20:20.327566257 -0400 -+++ src/sage/symbolic/ring.pyx 2016-10-20 08:20:45.531567222 -0400 -@@ -355,7 +355,7 @@ cdef class SymbolicRing(CommutativeRing) +--- src/sage/symbolic/ring.pyx.orig 2017-03-04 13:35:36.772496290 -0500 ++++ src/sage/symbolic/ring.pyx 2017-03-04 13:36:03.206497303 -0500 +@@ -379,7 +379,7 @@ cdef class SymbolicRing(CommutativeRing) from sage.misc.all import prod return prod([SR(p)**e for p,e in x], SR(x.unit())) else: diff --git a/sagemath-ntl.patch b/sagemath-ntl.patch index 5954f75..cc8e36f 100644 --- a/sagemath-ntl.patch +++ b/sagemath-ntl.patch @@ -1,13 +1,7 @@ -NTL 8.x introduces a new class, NTL::WrappedPtr. Unfortunately, Cython -does not add a namespace identifier to the name of the existing WrappedPtr -class, generated from the patched files below, resulting in ambiguous -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 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_ +--- src/sage/libs/polybori/decl.pxd.orig 2017-03-04 13:33:54.155492361 -0500 ++++ src/sage/libs/polybori/decl.pxd 2017-03-04 13:34:09.926492965 -0500 +@@ -291,10 +291,10 @@ cdef extern from "sage/libs/polybori/pb_ int (* size)() PBPolyEntry (* get "operator[]")(int) @@ -21,8 +15,8 @@ diff -up src/sage/libs/polybori/decl.pxd.orig src/sage/libs/polybori/decl.pxd cdef cppclass PBGBStrategy "GroebnerStrategy": 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 2015-10-11 18:10:35.738844321 -0300 -+++ src/sage/libs/polybori/pb_wrap.h 2015-10-11 18:12:42.724849183 -0300 +--- src/sage/libs/polybori/pb_wrap.h.orig 2017-03-04 13:34:07.773492882 -0500 ++++ src/sage/libs/polybori/pb_wrap.h 2017-03-04 13:34:09.928492965 -0500 @@ -177,23 +177,23 @@ PyObject* preallocated_to_PyString(const diff --git a/sagemath-pari.patch b/sagemath-pari.patch index df8610d..8664548 100644 --- a/sagemath-pari.patch +++ b/sagemath-pari.patch @@ -1,77 +1,24 @@ -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 2016-10-20 08:06:47.720535139 -0400 -+++ src/sage/libs/pari/handle_error.pxd 2016-10-20 08:07:01.459535665 -0400 -@@ -1,5 +1,5 @@ - from .types cimport GEN +diff -up src/sage/libs/cypari2/paridecl.pxd.orig src/sage/libs/cypari2/paridecl.pxd +--- src/sage/libs/cypari2/paridecl.pxd.orig 2017-03-04 14:37:56.976639516 -0500 ++++ src/sage/libs/cypari2/paridecl.pxd 2017-03-04 14:38:09.953640013 -0500 +@@ -77,7 +77,7 @@ cdef extern from "sage/libs/cypari2/cypa + int PARI_SIGINT_block, PARI_SIGINT_pending + void NEXT_PRIME_VIADIFF(long, byteptr) + void PREC_PRIME_VIADIFF(long, byteptr) +- int INIT_JMPm, INIT_SIGm, INIT_DFTm, INIT_noPRIMEm, INIT_noIMTm ++ int INIT_JMPm, INIT_SIGm, INIT_DFTm, INIT_noPRIMEm, INIT_noIMTm, INIT_noINTGMPm + int new_galois_format, factor_add_primes, factor_proven + int precdl + # The "except 0" here is to ensure compatibility with +diff -up src/sage/libs/cypari2/pari_instance.pyx.orig src/sage/libs/cypari2/pari_instance.pyx +--- src/sage/libs/cypari2/pari_instance.pyx.orig 2017-03-04 14:38:30.535640801 -0500 ++++ src/sage/libs/cypari2/pari_instance.pyx 2017-03-04 14:38:39.680641151 -0500 +@@ -510,7 +510,7 @@ cdef class PariInstance(PariInstance_aut + # As a simple heuristic, we set the virtual stack to 1/4 of the + # virtual memory. - 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 2016-10-20 08:07:12.336536082 -0400 -+++ src/sage/libs/pari/handle_error.pyx 2016-10-20 08:08:23.089538791 -0400 -@@ -139,7 +139,7 @@ cdef void _pari_init_error_handling(): - cb_pari_err_recover = _pari_err_recover +- pari_init_opts(size, maxprime, INIT_DFTm) ++ pari_init_opts(size, maxprime, INIT_DFTm|INIT_noINTGMPm) - --cdef int _pari_err_handle(GEN E) except 0: -+cdef int _pari_handle_exception(long errnum_unused) except 0: - """ - Convert a PARI error into a Sage exception, unless the error was - a stack overflow, in which case we enlarge the stack. -@@ -158,11 +158,11 @@ cdef int _pari_err_handle(GEN E) except - PariError: impossible inverse in gdiv: 0 - - """ -+ cdef GEN E = pari_err_last() - cdef long errnum = E[1] - - sig_block() - cdef char* errstr -- cdef char* s - try: - if errnum == e_STACK: - # Custom error message for PARI stack overflow -@@ -173,11 +173,6 @@ cdef int _pari_err_handle(GEN E) except - errstr = pari_err2str(E) - pari_error_string = errstr.decode('ascii') - pari_free(errstr) -- -- s = closure_func_err() -- if s is not NULL: -- pari_error_string = s.decode('ascii') + ": " + pari_error_string -- - raise PariError(errnum, pari_error_string, pari_instance.new_gen_noclear(E)) - finally: - sig_unblock() -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 2016-10-20 08:08:33.152539177 -0400 -+++ src/sage/libs/pari/pari_instance.pxd 2016-10-20 08:08:51.209539868 -0400 -@@ -5,6 +5,10 @@ cimport cython - - from sage.libs.pari.gen cimport gen - -+cdef extern from "gmp.h": -+ cdef void mp_get_memory_functions(void**, void**, void**) -+ cdef void mp_set_memory_functions(void*, void*, void*) -+ - cpdef long prec_bits_to_words(unsigned long prec_in_bits) - cpdef long prec_words_to_bits(long prec_in_words) - cpdef long default_bitprec() -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 2016-10-20 08:09:05.632540421 -0400 -+++ src/sage/libs/pari/pari_instance.pyx 2016-10-20 08:10:25.322543472 -0400 -@@ -475,7 +475,12 @@ cdef class PariInstance(PariInstance_aut - from sage.misc.memory_info import MemoryInfo - mem = MemoryInfo() - -+ cdef void *_gmp_malloc -+ cdef void *_gmp_realloc -+ cdef void *_gmp_free -+ mp_get_memory_functions(&_gmp_malloc, &_gmp_realloc, &_gmp_free) - pari_init_opts(size, maxprime, INIT_DFTm) -+ mp_set_memory_functions(_gmp_malloc, _gmp_realloc, _gmp_free) - - sizemax = mem.virtual_memory_limit() // 4 + from sage.misc.getusage import virtual_memory_limit diff --git a/sagemath-readonly.patch b/sagemath-readonly.patch index 25569d6..5c3041a 100644 --- a/sagemath-readonly.patch +++ b/sagemath-readonly.patch @@ -1,7 +1,7 @@ diff -up src/sage/all.py.orig src/sage/all.py ---- src/sage/all.py.orig 2016-08-08 13:29:42.192520823 -0400 -+++ src/sage/all.py 2016-08-08 13:30:18.601522217 -0400 -@@ -305,11 +305,11 @@ def _write_started_file(): +--- src/sage/all.py.orig 2017-03-04 13:24:30.701470784 -0500 ++++ src/sage/all.py 2017-03-04 13:24:50.878471557 -0500 +@@ -300,11 +300,11 @@ def _write_started_file(): Check that the file exists when Sage is running:: diff --git a/sagemath-rpmbuild.patch b/sagemath-rpmbuild.patch index 9274762..fc8ff77 100644 --- a/sagemath-rpmbuild.patch +++ b/sagemath-rpmbuild.patch @@ -1,6 +1,6 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2016-10-20 08:01:32.743523078 -0400 -+++ src/module_list.py 2016-10-20 08:01:43.593523493 -0400 +--- src/module_list.py.orig 2017-03-04 13:14:34.197447942 -0500 ++++ src/module_list.py 2017-03-04 13:14:58.646448878 -0500 @@ -3,7 +3,7 @@ from glob import glob from distutils.extension import Extension from sage.env import SAGE_LOCAL @@ -11,9 +11,9 @@ diff -up src/module_list.py.orig src/module_list.py ######################################################### ### pkg-config setup diff -up src/sage/misc/cython.py.orig src/sage/misc/cython.py ---- src/sage/misc/cython.py.orig 2016-10-20 08:03:03.079526537 -0400 -+++ src/sage/misc/cython.py 2016-10-20 08:03:18.761527138 -0400 -@@ -433,7 +433,7 @@ extra_compile_args = %s +--- src/sage/misc/cython.py.orig 2017-03-04 13:15:11.022449352 -0500 ++++ src/sage/misc/cython.py 2017-03-04 13:15:43.031450578 -0500 +@@ -432,7 +432,7 @@ extra_compile_args = %s ext_modules = [Extension('%s', sources=['%s.%s', %s], libraries=%s, @@ -23,41 +23,70 @@ diff -up src/sage/misc/cython.py.orig src/sage/misc/cython.py language = '%s' )] diff -up src/setup.py.orig src/setup.py ---- src/setup.py.orig 2016-10-20 08:01:54.264523902 -0400 -+++ src/setup.py 2016-10-20 08:02:33.449525402 -0400 -@@ -584,11 +584,9 @@ def run_cythonize(): - print('Enabling Cython profiling support') - profile = True +--- src/setup.py.orig 2017-03-04 13:15:50.884450879 -0500 ++++ src/setup.py 2017-03-04 13:18:14.831456391 -0500 +@@ -412,9 +412,8 @@ class sage_build_ext(build_ext): + # Debugging + gdb_debug=debug, + output_dir=SAGE_CYTHONIZED, +- # Disable Cython caching, which is currently too broken to +- # use reliably: http://trac.sagemath.org/ticket/17851 +- cache=False, ++ # Enable Cython caching (the cache is stored in ~/.cycache which is ++ cache=True, + ) -- # 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 + open(version_file, 'w').write(version_stamp) +@@ -699,9 +698,6 @@ class sage_install(install): + install.run(self) + self.install_kernel_spec() + log.warn('Cleaning up stale installed files....') +- t = time.time() +- self.clean_stale_files() +- log.warn('Finished cleaning, time: %.2f seconds.' % (time.time() - t)) - force = True - version_file = os.path.join(SAGE_CYTHONIZED, '.cython_version') -@@ -641,21 +639,6 @@ print("Discovered Python/Cython sources, + def install_kernel_spec(self): + """ +@@ -715,42 +711,6 @@ class sage_install(install): + from sage.repl.ipython_kernel.install import SageKernelSpec + SageKernelSpec.update() +- def clean_stale_files(self): +- """ +- Remove stale installed files. +- +- This removes files which are built/installed but which do not +- exist in the Sage sources (typically because some source file +- has been deleted). Files are removed from the build directory +- ``build/lib-*`` and from the install directory ``site-packages``. +- """ +- dist = self.distribution +- cmd_build_py = dist.get_command_obj("build_py") +- cmd_build_py.ensure_finalized() +- cmd_build_ext = dist.get_command_obj("build_ext") +- cmd_build_ext.ensure_finalized() +- +- # Determine all Python modules inside all packages +- py_modules = [] +- for package in dist.packages: +- package_dir = cmd_build_py.get_package_dir(package) +- py_modules += cmd_build_py.find_package_modules(package, package_dir) +- # modules is a list of triples (package, module, module_file). +- # Construct the complete module name from this. +- py_modules = ["{0}.{1}".format(*m) for m in py_modules] +- +- # Clean install directory (usually, purelib and platlib are the same) +- # and build directory. +- output_dirs = [self.install_purelib, self.install_platlib, self.build_lib] +- from sage_setup.clean import clean_install_dir +- for output_dir in set(output_dirs): +- log.warn('- cleaning {0}'.format(output_dir)) +- clean_install_dir(output_dir, +- dist.packages, +- py_modules, +- dist.ext_modules, +- cmd_build_ext.cythonized_files) +- ######################################################### --### Clean --######################################################### -- --print('Cleaning up stale installed files....') --t = time.time() --from sage_setup.clean import clean_install_dir --output_dirs = SITE_PACKAGES + glob.glob(os.path.join(build_base, 'lib*')) --for output_dir in output_dirs: -- print('- cleaning {0}'.format(output_dir)) -- clean_install_dir(output_dir, python_packages, python_modules, -- ext_modules, python_data_files) --print('Finished cleaning, time: %.2f seconds.' % (time.time() - t)) -- -- --######################################################### - ### Install also Jupyter kernel spec - ######################################################### - + ### Distutils diff --git a/sagemath-sagedoc.patch b/sagemath-sagedoc.patch index 2ca817a..761e70e 100644 --- a/sagemath-sagedoc.patch +++ b/sagemath-sagedoc.patch @@ -1,7 +1,7 @@ diff -up src/doc/common/conf.py.orig src/doc/common/conf.py ---- src/doc/common/conf.py.orig 2016-10-20 08:03:49.618528319 -0400 -+++ src/doc/common/conf.py 2016-10-20 08:04:20.281529493 -0400 -@@ -217,7 +217,7 @@ if (os.environ.get('SAGE_DOC_MATHJAX', ' +--- src/doc/common/conf.py.orig 2017-03-30 11:27:42.351311111 -0400 ++++ src/doc/common/conf.py 2017-03-30 11:27:44.482311193 -0400 +@@ -218,7 +218,7 @@ if (os.environ.get('SAGE_DOC_MATHJAX', ' html_theme_options['mathjax_macros'] = sage_mathjax_macros() from pkg_resources import Requirement, working_set @@ -11,8 +11,8 @@ diff -up src/doc/common/conf.py.orig src/doc/common/conf.py # It would be really nice if sphinx would copy the entire mathjax directory, diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py ---- src/sage/doctest/control.py.orig 2016-10-20 08:03:49.619528319 -0400 -+++ src/sage/doctest/control.py 2016-10-20 08:04:20.283529494 -0400 +--- src/sage/doctest/control.py.orig 2017-03-30 11:27:42.358311112 -0400 ++++ src/sage/doctest/control.py 2017-03-30 11:27:44.483311193 -0400 @@ -95,7 +95,6 @@ class DocTestDefaults(SageObject): self.valgrind = False self.massif = False @@ -30,15 +30,7 @@ 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: -@@ -635,7 +634,6 @@ class DocTestController(SageObject): - from sage.env import SAGE_SRC, SAGE_DOC_SRC, SAGE_ROOT - def all_files(): - self.files.append(opj(SAGE_SRC, 'sage')) -- self.files.append(opj(SAGE_SRC, 'sage_setup')) - self.files.append(SAGE_DOC_SRC) - self.options.sagenb = True - DOT_GIT= opj(SAGE_ROOT, '.git') -@@ -1030,13 +1028,8 @@ class DocTestController(SageObject): +@@ -1030,13 +1029,8 @@ class DocTestController(SageObject): elif opt.cachegrind: toolname = "cachegrind" flags = os.getenv("SAGE_CACHEGRIND_FLAGS", "") @@ -52,7 +44,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 -@@ -1096,10 +1089,10 @@ class DocTestController(SageObject): +@@ -1096,10 +1090,10 @@ class DocTestController(SageObject): 0 """ opt = self.options @@ -66,20 +58,20 @@ 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 2016-10-20 08:03:49.621528319 -0400 -+++ src/sage/interfaces/singular.py 2016-10-20 08:04:20.286529494 -0400 -@@ -2258,7 +2258,7 @@ def generate_docstring_dictionary(): +--- src/sage/interfaces/singular.py.orig 2017-03-30 11:27:42.364311112 -0400 ++++ src/sage/interfaces/singular.py 2017-03-30 11:27:44.486311193 -0400 +@@ -2291,7 +2291,7 @@ def generate_docstring_dictionary(): nodes.clear() node_names.clear() -- singular_docdir = os.environ["SAGE_LOCAL"]+"/share/singular/" +- singular_docdir = SAGE_LOCAL+"/share/info/" + singular_docdir = os.environ["SINGULAR_BIN_DIR"]+"/info/" new_node = re.compile("File: singular\.hlp, Node: ([^,]*),.*") new_lookup = re.compile("\* ([^:]*):*([^.]*)\..*") diff -up src/sage_setup/docbuild/ext/multidocs.py.orig src/sage_setup/docbuild/ext/multidocs.py ---- src/sage_setup/docbuild/ext/multidocs.py.orig 2016-10-20 08:03:49.622528319 -0400 -+++ src/sage_setup/docbuild/ext/multidocs.py 2016-10-20 08:04:20.287529494 -0400 +--- src/sage_setup/docbuild/ext/multidocs.py.orig 2017-03-30 11:27:42.371311112 -0400 ++++ src/sage_setup/docbuild/ext/multidocs.py 2017-03-30 11:27:44.487311193 -0400 @@ -83,8 +83,11 @@ def merge_environment(app, env): for ind in newalldoc: # treat subdocument source as orphaned file and don't complain @@ -95,14 +87,16 @@ diff -up src/sage_setup/docbuild/ext/multidocs.py.orig src/sage_setup/docbuild/e newcite = {} for ind, (path, tag) in docenv.citations.iteritems(): diff -up src/sage_setup/docbuild/__init__.py.orig src/sage_setup/docbuild/__init__.py ---- src/sage_setup/docbuild/__init__.py.orig 2016-10-20 08:04:16.858529362 -0400 -+++ src/sage_setup/docbuild/__init__.py 2016-10-20 08:04:20.288529494 -0400 -@@ -295,12 +295,12 @@ class AllBuilder(object): +--- src/sage_setup/docbuild/__init__.py.orig 2017-03-30 11:27:42.379311112 -0400 ++++ src/sage_setup/docbuild/__init__.py 2017-03-30 11:29:25.179315049 -0400 +@@ -248,13 +248,14 @@ if NUM_THREADS > 1: + # map_async handles KeyboardInterrupt correctly. Plain map and # apply_async does not, so don't use it. - x = pool.map_async(build_other_doc, L, 1) + x = pool.map_async(target, args, 1) ++ ret = [] try: -- x.get(99999) -+ x.get(3600) +- ret = x.get(99999) ++ ret = x.get(3600) pool.close() pool.join() except Exception: @@ -110,20 +104,5 @@ diff -up src/sage_setup/docbuild/__init__.py.orig src/sage_setup/docbuild/__init if ABORT_ON_ERROR: + pool.terminate() raise - logger.warning("Elapsed time: %.1f seconds."%(time.time()-start)) - logger.warning("Done building the documentation!") -@@ -492,12 +492,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. + return ret + else: diff --git a/sagemath-scripts.patch b/sagemath-scripts.patch index 73cf523..bbe6da5 100644 --- a/sagemath-scripts.patch +++ b/sagemath-scripts.patch @@ -1,6 +1,6 @@ diff -up src/bin/sage.orig src/bin/sage ---- src/bin/sage.orig 2016-12-30 06:31:16.930949819 -0500 -+++ src/bin/sage 2016-12-30 06:31:50.812950266 -0500 +--- src/bin/sage.orig 2017-03-04 12:58:43.035411519 -0500 ++++ src/bin/sage 2017-03-04 13:08:11.111433272 -0500 @@ -1,5 +1,16 @@ #!/usr/bin/env bash @@ -62,16 +62,16 @@ diff -up src/bin/sage.orig src/bin/sage echo #### 1.......................26..................................................78 -@@ -78,8 +78,6 @@ usage_advanced() { - echo " 'default', 'sagenb', and 'jupyter'). See the output" - echo " of sage --notebook --help for more details and" - echo " examples of how to pass optional arguments" +@@ -79,8 +79,6 @@ usage_advanced() { + echo " See the output of sage --notebook --help" + echo " for more details and examples of how to pass" + echo " optional arguments" - echo " -bn, -build-and-notebook [...] -- build the Sage library then start" - echo " the Sage notebook" 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" -@@ -98,18 +96,12 @@ usage_advanced() { +@@ -99,17 +97,13 @@ 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" @@ -81,16 +81,15 @@ diff -up src/bin/sage.orig src/bin/sage echo " -lisp [...] -- run Lisp interpreter included with Sage" echo " -M2 [...] -- run Sage's Macaulay2 with given arguments" - command -v M2 &>/dev/null || \ -- echo " (not installed currently, run sage -i macaulay2)" + echo " (not installed currently, run sage -i macaulay2)" echo " -maxima [...] -- run Sage's Maxima with given arguments" echo " -mwrank [...] -- run Sage's mwrank with given arguments" echo " -polymake [...] -- run Sage's Polymake with given arguments" - command -v polymake &>/dev/null || \ -- echo " (not installed currently, run sage -i polymake)" + echo " (not installed currently, run sage -i polymake)" echo " -python [...] -- run the Python interpreter" echo " -R [...] -- run Sage's R with given arguments" - echo " -scons [...] -- run Sage's scons" -@@ -121,49 +113,7 @@ usage_advanced() { +@@ -122,55 +116,7 @@ usage_advanced() { echo #### 1.......................26..................................................78 #### |.....................--.|...................................................| @@ -107,6 +106,12 @@ diff -up src/bin/sage.orig src/bin/sage - echo " if they are already installed" - echo " -s -- do not delete the temporary build directories" - echo " after a successful build" +- echo " -y -- reply yes to prompts about experimental" +- echo " and old-style packages; warning: there" +- echo " is no guarantee that these packages will" +- echo " build correctly; use at your own risk" +- echo " -n -- reply no to prompts about experimental" +- echo " and old-style packages" - echo " -p [opts] [packages]-- install the given Sage packages, without dependency" - echo " checking and with support for old-style spkgs." - echo " Options are -c, -d and -s with the same meaning as" @@ -141,7 +146,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" -@@ -193,7 +143,6 @@ usage_advanced() { +@@ -200,7 +146,6 @@ usage_advanced() { echo " -coverage -- give info about doctest coverage of files" echo " -coverageall -- give summary info about doctest coverage of all" echo " files in the Sage library" @@ -149,7 +154,7 @@ diff -up src/bin/sage.orig src/bin/sage echo " -search_src -- search through all the Sage library code for string" echo " -search_doc -- search through the Sage documentation for string" echo " -grep -- same as -search_src" -@@ -213,16 +162,6 @@ usage_advanced() { +@@ -220,16 +165,6 @@ usage_advanced() { echo #### 1.......................26..................................................78 #### |.....................--.|...................................................| @@ -166,7 +171,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" -@@ -236,9 +175,6 @@ usage_advanced() { +@@ -243,9 +178,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" @@ -176,10 +181,27 @@ 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'." -@@ -263,87 +199,6 @@ if [ "$1" = '--nodotsage' ]; then - exit $status - fi +@@ -253,104 +185,6 @@ usage_advanced() { + exit 0 + } +- +-##################################################################### +-# Special options to be processed without sage-env +-##################################################################### +- +-# 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 +- command "$0" "$@" +- status=$? +- rm -rf "$DOT_SAGE" +- exit $status +-fi +- -# Check for '--patchbot' before sourcing sage-env: patchbot needs -# an unclobbered environment before testing unsafe tickets. -if [ "$1" = '-patchbot' -o "$1" = "--patchbot" ]; then @@ -264,7 +286,7 @@ 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 -@@ -355,23 +210,10 @@ fi +@@ -362,23 +196,9 @@ fi # Prepare for running Sage, either interactively or non-interactively. sage_setup() { @@ -279,7 +301,7 @@ diff -up src/bin/sage.orig src/bin/sage - echo >&2 '************************************************************************' - exit 1 - fi - +- # Display the startup banner (unless SAGE_BANNER is explictly "no") sage_banner @@ -288,7 +310,7 @@ 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 -@@ -382,20 +224,6 @@ sage_setup() { +@@ -389,20 +209,6 @@ sage_setup() { } @@ -309,16 +331,7 @@ diff -up src/bin/sage.orig src/bin/sage # Start an interactive Sage session, this function never returns. interactive_sage() { sage_setup -@@ -472,7 +300,7 @@ fi - - if [ "$1" = '-singular' -o "$1" = '--singular' ]; then - shift -- exec singular "$@" -+ exec Singular "$@" - fi - - if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then -@@ -500,16 +328,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ] +@@ -507,16 +313,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ] exec ecl "$@" fi @@ -335,10 +348,27 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then shift exec maxima "$@" -@@ -560,11 +378,6 @@ if [ "$1" = '-git' -o "$1" = '--git' ]; - exec git "$@" +@@ -542,11 +338,6 @@ if [ "$1" = '-pip' -o "$1" = '--pip' ]; + exec pip-lock "$@" fi +-if [ "$1" = '-fix-pkg-checksums' -o "$1" = '--fix-pkg-checksums' ]; then +- shift +- exec sage-fix-pkg-checksums "$@" +-fi +- + if [ "$1" = '-python' -o "$1" = '--python' ]; then + shift + exec python "$@" +@@ -562,16 +353,6 @@ if [ "$1" = '-ipython' -o "$1" = '--ipyt + exec ipython "$@" + fi + +-if [ "$1" = '-git' -o "$1" = '--git' ]; then +- shift +- exec git "$@" +-fi +- -if [ "$1" = '-git-branch' -o "$1" = '--git-branch' ]; then - shift - exec git --git-dir="$SAGE_ROOT"/.git rev-parse --abbrev-ref HEAD @@ -347,10 +377,11 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = '-sh' -o "$1" = '--sh' ]; then # AUTHORS: # - Carl Witty and William Stein: initial version -@@ -684,20 +497,6 @@ EOF +@@ -690,19 +471,6 @@ EOF + exit $status fi - ##################################################################### +-##################################################################### -# Test coverage of a module? -##################################################################### - @@ -363,12 +394,10 @@ diff -up src/bin/sage.orig src/bin/sage - shift - exec sage-coverageall "$@" -fi -- --##################################################################### - # File conversion - ##################################################################### -@@ -715,11 +514,6 @@ fi + ##################################################################### + # File conversion +@@ -722,11 +490,6 @@ fi # Run Sage's versions of the standard Algebra/Geometry etc. software ##################################################################### @@ -380,7 +409,7 @@ diff -up src/bin/sage.orig src/bin/sage if [[ "$1" =~ ^--notebook=.* || "$1" =~ ^-n=.* || "$1" =~ ^-notebook=.* ]] ; then sage-cleaner &>/dev/null & exec sage-notebook "$@" -@@ -730,13 +524,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not +@@ -737,13 +500,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not exec sage-notebook "$@" fi @@ -394,7 +423,7 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then shift sage-cleaner &>/dev/null & -@@ -755,31 +542,12 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep +@@ -762,31 +518,12 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep exit 0 fi @@ -427,7 +456,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 -@@ -795,10 +563,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" +@@ -802,10 +539,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" fi fi @@ -439,7 +468,7 @@ diff -up src/bin/sage.orig src/bin/sage shift SAGE_BANNER=no sage_setup export PYTHONIOENCODING="utf-8" # Fix encoding for doctests -@@ -824,114 +589,6 @@ if [ "$1" = '--location' ]; then +@@ -831,130 +565,6 @@ if [ "$1" = '--location' ]; then exit 0 fi @@ -551,10 +580,26 @@ diff -up src/bin/sage.orig src/bin/sage - exec python -m "sage_setup.docbuild" "$@" -fi - - if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then +-if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then +- shift +- sage_setup +- if [ "$SAGE_DEBUG" = "no" ]; then +- gdb -x "$SAGE_LOCAL/bin/sage-gdb-commands" \ +- -args python "$SAGE_LOCAL/bin/sage-ipython" "$@" -i +- else +- # Location of cython_debug directory +- cygdb_dir="$SAGE_SRC/build/cythonized" +- cygdb "$cygdb_dir" "$SAGE_SRC/sage" \ +- -- -x "$SAGE_LOCAL/bin/sage-gdb-commands" \ +- -args python "$SAGE_LOCAL/bin/sage-ipython" "$@" -i +- fi +- exit $? +-fi +- + if [ "$1" = '-preparse' -o "$1" = "--preparse" ]; then shift - sage_setup -@@ -980,26 +637,11 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca + exec sage-preparse "$@" +@@ -989,21 +599,10 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca exec sage-callgrind "$@" fi @@ -574,16 +619,11 @@ diff -up src/bin/sage.orig src/bin/sage -fi - if [ $# -ge 1 ]; then -- T=`echo "$1" | sed -e "s/.*\.//"` -- if [ "$T" = "spkg" ]; then -- install "$@" -- fi - SAGE_BANNER=no sage_setup - unset TERM # See Trac #12263 - exec sage-run "$@" + T=`echo "$1" | sed -e "s/.*\.//"` + if [ "$T" = "spkg" ]; then diff -up src/bin/sage-runtests.orig src/bin/sage-runtests ---- src/bin/sage-runtests.orig 2016-12-30 06:31:16.938949819 -0500 -+++ src/bin/sage-runtests 2016-12-30 06:31:21.902949885 -0500 +--- src/bin/sage-runtests.orig 2017-03-04 13:08:31.712434061 -0500 ++++ src/bin/sage-runtests 2017-03-04 13:08:41.887434451 -0500 @@ -56,10 +56,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 " + @@ -596,8 +636,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 2016-12-30 06:31:16.945949819 -0500 -+++ src/bin/sage-valgrind 2016-12-30 06:31:21.903949885 -0500 +--- src/bin/sage-valgrind.orig 2017-03-04 13:08:52.937434874 -0500 ++++ src/bin/sage-valgrind 2017-03-04 13:09:13.143435648 -0500 @@ -1,16 +1,6 @@ #!/usr/bin/env bash @@ -612,7 +652,7 @@ diff -up src/bin/sage-valgrind.orig src/bin/sage-valgrind -SUPP+=" --suppressions=$SAGE_EXTCODE/valgrind/sage-additional.supp" - -MEMCHECK_FLAGS="--leak-resolution=high --leak-check=full --num-callers=25 $SUPP" -+MEMCHECK_FLAGS="--leak-resolution=high --leak-check=full --num-callers=25 " ++MEMCHECK_FLAGS="--leak-resolution=high --leak-check=full --num-callers=25" if [ "$SAGE_MEMCHECK_FLAGS" ]; then echo "Overwriting memcheck flags with: $SAGE_MEMCHECK_FLAGS" diff --git a/sagemath-singular.patch b/sagemath-singular.patch new file mode 100644 index 0000000..73d8c9d --- /dev/null +++ b/sagemath-singular.patch @@ -0,0 +1,35 @@ +diff -up src/sage/libs/singular/decl.pxd.orig src/sage/libs/singular/decl.pxd +--- src/sage/libs/singular/decl.pxd.orig 2017-03-29 14:40:18.119445065 -0400 ++++ src/sage/libs/singular/decl.pxd 2017-03-29 14:42:36.153450351 -0400 +@@ -484,8 +484,8 @@ cdef extern from "singular/Singular/libs + + ring *rDefault(int char , int nvars, char **names) + ring *rDefault(const n_Procs_s* cf, int nvars, char **names) +- ring *rDefault(int ch , int nvars, char **names,int ord_size, int *ord, int *block0, int *block1, int **wvhdl) +- ring *rDefault(const n_Procs_s* cf, int nvars, char **names,int ord_size, int *ord, int *block0, int *block1, int **wvhdl) ++ ring *rDefault(int ch , int nvars, char **names,int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl) ++ ring *rDefault(const n_Procs_s* cf, int nvars, char **names,int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl) + + + +diff -up src/sage/libs/singular/ring.pyx.orig src/sage/libs/singular/ring.pyx +--- src/sage/libs/singular/ring.pyx.orig 2017-03-29 14:40:24.767445320 -0400 ++++ src/sage/libs/singular/ring.pyx 2017-03-29 14:43:38.593452742 -0400 +@@ -21,7 +21,7 @@ from sage.libs.gmp.mpz cimport mpz_init_ + from sage.libs.singular.decl cimport number, poly, ring, currRing + from sage.libs.singular.decl cimport rChangeCurrRing, rCopy0, rComplete, rDelete, idInit + from sage.libs.singular.decl cimport omAlloc0, omStrDup, omAlloc, omAlloc0Bin, sip_sring_bin, rnumber_bin +-from sage.libs.singular.decl cimport ringorder_dp, ringorder_Dp, ringorder_lp, ringorder_rp, ringorder_ds, ringorder_Ds, ringorder_ls, ringorder_M, ringorder_C, ringorder_wp, ringorder_Wp, ringorder_ws, ringorder_Ws, ringorder_a ++from sage.libs.singular.decl cimport rRingOrder_t, ringorder_dp, ringorder_Dp, ringorder_lp, ringorder_rp, ringorder_ds, ringorder_Ds, ringorder_ls, ringorder_M, ringorder_C, ringorder_wp, ringorder_Wp, ringorder_ws, ringorder_Ws, ringorder_a + from sage.libs.singular.decl cimport p_Copy, prCopyR + from sage.libs.singular.decl cimport n_unknown, n_Zp, n_Q, n_R, n_GF, n_long_R, n_algExt,n_transExt,n_long_C, n_Z, n_Zn, n_Znm, n_Z2m, n_CF + from sage.libs.singular.decl cimport n_coeffType, cfInitCharProc +@@ -165,7 +165,7 @@ cdef ring *singular_ring_new(base_ring, + ## q q : GF(q=p^n) *names TRUE (todo) + + _wvhdl = omAlloc0((nblcks + 2) * sizeof(int *)) +- _order = omAlloc0((nblcks + 2) * sizeof(int)) ++ _order = omAlloc0((nblcks + 2) * sizeof(rRingOrder_t)) + _block0 = omAlloc0((nblcks + 2) * sizeof(int)) + _block1 = omAlloc0((nblcks + 2) * sizeof(int)) + diff --git a/sagemath.spec b/sagemath.spec index 92f0573..515db96 100644 --- a/sagemath.spec +++ b/sagemath.spec @@ -34,12 +34,12 @@ %global SAGE_TIMEOUT_LONG 180 %global conway_polynomials_pkg conway_polynomials-0.4 -%global cysignals_pkg cysignals-1.1.1 +%global cysignals_pkg cysignals-1.3.2 %global elliptic_curves_pkg elliptic_curves-0.8 %global flintqs_pkg flintqs-1.0 -%global graphs_pkg graphs-20151224 +%global graphs_pkg graphs-20161026 %if %{with bundled_ipython} -%global ipython_pkg ipython-5.0.0 +%global ipython_pkg ipython-5.1.0 %endif %if %{with bundled_pari} %global pari_pkg pari-2.8.0.alpha @@ -51,6 +51,7 @@ %global rubiks_pkg rubiks-20070912 %global sagenb_pkg sagenb-0.13 %global sagetex_pkg sagetex-3.0 +%global Sphinx_pkg Sphinx-1.4.4 %global SAGE_ROOT %{_libdir}/sagemath %global SAGE_LOCAL %{SAGE_ROOT}/local @@ -64,8 +65,8 @@ Name: sagemath Group: Applications/Engineering Summary: A free open-source mathematics software system -Version: 7.4 -Release: 4%{?dist} +Version: 7.5.1 +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 @@ -185,8 +186,8 @@ Patch29: %{name}-atlas.patch # Update for python-flask-0.11.1 Patch30: %{name}-flask.patch -# Corrections to build in latest f25 and rawhide -Patch31: %{name}-ftbfs.patch +# Minor adaptation to latest singular +Patch31: %{name}-singular.patch BuildRequires: 4ti2 BuildRequires: arb-devel @@ -244,7 +245,9 @@ BuildRequires: nauty BuildRequires: ntl-devel BuildRequires: numpy BuildRequires: palp -%if %{without bundled_pari} +%if %{with bundled_pari} +BuildConflicts: pari-devel +%else BuildRequires: pari-devel BuildRequires: pari-gp %endif @@ -266,6 +269,7 @@ BuildRequires: python-networkx BuildRequires: python-pexpect %endif BuildRequires: python-pkgconfig +BuildRequires: python-psutil BuildRequires: python-sphinx BuildRequires: python-six BuildRequires: python-twisted @@ -599,6 +603,11 @@ computations, and plots from the Sage mathematics software suite pushd build/pkgs/cysignals tar jxf ../../../upstream/%{cysignals_pkg}.tar.bz2 mv %{cysignals_pkg} src + if [ %{__isa_bits} = "64" ]; then + for file in $(find . -name cysignals-CSI); do + sed -i "s/'lib'/'%{_lib}'/" $file + done + fi popd pushd build/pkgs/conway_polynomials @@ -679,6 +688,20 @@ pushd build/pkgs/sagetex mv %{sagetex_pkg} src popd +%if %{with docs} +%if %{with sphinx_hack} +pushd build/pkgs/sphinx + tar zxf ../../../upstream/%{Sphinx_pkg}.tar.gz + mv %{Sphinx_pkg} src + pushd src + for diff in `ls ../patches/*.patch`; do + patch -p1 < $diff + done + popd +popd +%endif +%endif + %patch1 %patch2 %patch3 @@ -714,6 +737,7 @@ popd %patch24 %patch25 %patch26 + %patch27 %patch28 %patch29 @@ -1186,9 +1210,11 @@ pushd src/doc export PYTHONPATH=$SAGE_SETUP:%{buildroot}%{python_sitearch}:$SAGE_PYTHONPATH:$SAGE_DOC %if %{with sphinx_hack} - cp -far %{python_sitelib}/sphinx %{buildroot}%{python_sitearch} - sed -i "s|\(source.startswith('>>>')\)|\1 or source.startswith('sage: ')|" \ - %{buildroot}%{python_sitearch}/sphinx/highlighting.py + pushd ../../build/pkgs/sphinx/src + %__python2 setup.py build + %__python2 setup.py install --root %{buildroot} --install-purelib=%{python_sitearch} + rm -f %{buildroot}%{_bindir}/sphinx* + popd %endif # there we go @@ -1198,7 +1224,7 @@ pushd src/doc # python -m sage_setup.docbuild # FIXME there is a 'ja' translation, but adding it to $LANGUAGES # does not get documentation built - LANGUAGES="ca de en fr hu it pt ru tr" \ + SAGE_NUM_THREADS=2 LANGUAGES="ca de en fr hu it pt ru tr" \ %__python2 -m docbuild --no-pdf-links -k all html rm -f %{buildroot}%{SAGE_SRC}/doc ln -sf %{SAGE_DOC} %{buildroot}%{SAGE_SRC}/doc @@ -1221,7 +1247,8 @@ sed -i 's|%{buildroot}||g' $SAGE_DOC/test.log %endif %if %{with sphinx_hack} - rm -fr %{buildroot}%{python_sitearch}/sphinx + rm -fr %{buildroot}%{python_sitearch}/sphinx \ + %{buildroot}%{python_sitearch}/Sphinx* %endif # More wrong buildroot references @@ -1233,6 +1260,8 @@ perl -pi -e 's|%{buildroot}||g;' \ # Script was used to build documentation perl -pi -e 's|%{buildroot}||g;s|^##||g;' %{buildroot}%{_bindir}/sage +perl -pi -e 's|%{buildroot}||;' \ + %{buildroot}%{python_sitearch}/cysignals/__init__.pxd #------------------------------------------------------------------------ # Fix links @@ -1282,6 +1311,7 @@ chmod -x %{buildroot}%{SAGE_DOC}/en/prep/media/Rplot001.png find %{buildroot}%{SAGE_DOC} -name .buildinfo -exec rm {} \; rm -fr %{buildroot}%{SAGE_DOC}/output/inventory find %{buildroot}%{SAGE_DOC} -type d -name _sources | xargs rm -fr +find %{buildroot}%{SAGE_DOC} -name 'core.*' -exec rm {} \; %endif # remove .po files @@ -1662,6 +1692,9 @@ exit 0 ######################################################################## %changelog +* Thu Apr 6 20176 pcpa - 7.5.1-1 +- Update to sagemath 7.5.1 + * Fri Mar 3 2017 Jerry James - 7.4-4 - Rebuild for ppl 1.2 diff --git a/sources b/sources index d70973c..66276e4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sage-7.4.tar.gz) = e45d3b5617b190302e8fff9f281551d0b2c27710d860892d6511019272e2f80487e27ffe7dce6c1276da721817a8cbd7946fd5a2e32741e5cba1955496c1b041 +SHA512 (sage-7.5.1.tar.gz) = ef18951250573f4c04911757664e25f7e03332df36efd948e189009e62573b8f120a413b322947fee6e914cbcc64fbd99d5a960954a04ba5786660ecc0a6ee96