diff --git a/sagemath-env.patch b/sagemath-env.patch new file mode 100644 index 0000000..7f69094 --- /dev/null +++ b/sagemath-env.patch @@ -0,0 +1,41 @@ +diff -up src/sage/env.py.orig src/sage/env.py +--- src/sage/env.py.orig 2019-06-27 11:45:30.915744723 -0600 ++++ src/sage/env.py 2019-06-28 11:31:09.965474086 -0600 +@@ -151,11 +151,11 @@ var('SAGE_DATE', version.date) + var('SAGE_VERSION_BANNER', version.banner) + + # bunch of sage directories and files +-var('SAGE_LOCAL', os.path.abspath(sys.prefix)) +-var('SAGE_ETC', join(SAGE_LOCAL, 'etc')) +-var('SAGE_INC', join(SAGE_LOCAL, 'include')) +-var('SAGE_SHARE', join(SAGE_LOCAL, 'share')) +-var('SAGE_DOC', join(SAGE_SHARE, 'doc', 'sage')) ++var('SAGE_LOCAL', '@@SAGE_LOCAL@@') ++var('SAGE_ETC', join('/usr', 'share', 'sagemath', 'etc')) ++var('SAGE_INC', join('/usr', 'include')) ++var('SAGE_SHARE', join('/usr', 'share', 'sagemath')) ++var('SAGE_DOC', join('/usr', 'share', 'doc', 'sagemath')) + var('SAGE_SPKG_INST', join(SAGE_LOCAL, 'var', 'lib', 'sage', 'installed')) + var('SAGE_LIB', os.path.dirname(os.path.dirname(sage.__file__))) + +@@ -169,7 +169,7 @@ var('DOT_SAGE', join(os.envir + var('SAGE_STARTUP_FILE', join(DOT_SAGE, 'init.sage')) + + # installation directories for various packages +-var('SAGE_EXTCODE', join(SAGE_SHARE, 'sage', 'ext')) ++var('SAGE_EXTCODE', join('/usr', 'share', 'sagemath', 'etc')) + var('CONWAY_POLYNOMIALS_DATA_DIR', join(SAGE_SHARE, 'conway_polynomials')) + var('GRAPHS_DATA_DIR', join(SAGE_SHARE, 'graphs')) + var('ELLCURVE_DATA_DIR', join(SAGE_SHARE, 'ellcurves')) +@@ -181,9 +181,9 @@ var('CREMONA_MINI_DATA_DIR', joi + var('CREMONA_LARGE_DATA_DIR', join(SAGE_SHARE, 'cremona')) + var('JMOL_DIR', join(SAGE_SHARE, 'jmol')) + var('JSMOL_DIR', join(SAGE_SHARE, 'jsmol')) +-var('MATHJAX_DIR', join(SAGE_SHARE, 'mathjax')) ++var('MATHJAX_DIR', join('/usr', 'share', 'javascript', 'mathjax')) + var('THREEJS_DIR', join(SAGE_SHARE, 'threejs')) +-var('PPLPY_DOCS', join(SAGE_SHARE, 'doc', 'pplpy')) ++var('PPLPY_DOCS', join('/usr', 'share', 'doc', 'python3-pplpy')) + var('MAXIMA_FAS') + + # misc diff --git a/sagemath-escape.patch b/sagemath-escape.patch index 57e58ae..16ee016 100644 --- a/sagemath-escape.patch +++ b/sagemath-escape.patch @@ -1,6 +1,6 @@ diff -up src/sage/combinat/crystals/alcove_path.py.orig src/sage/combinat/crystals/alcove_path.py ---- src/sage/combinat/crystals/alcove_path.py.orig 2019-03-23 16:20:34.000000000 -0600 -+++ src/sage/combinat/crystals/alcove_path.py 2019-04-08 13:33:18.101386015 -0600 +--- src/sage/combinat/crystals/alcove_path.py.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/sage/combinat/crystals/alcove_path.py 2019-06-27 11:46:03.613253846 -0600 @@ -383,7 +383,7 @@ class CrystalOfAlcovePaths(UniqueReprese One can compute all vertices of the crystal by finding all the @@ -11,8 +11,8 @@ diff -up src/sage/combinat/crystals/alcove_path.py.orig src/sage/combinat/crysta .. WARNING:: diff -up src/sage/homology/homology_group.py.orig src/sage/homology/homology_group.py ---- src/sage/homology/homology_group.py.orig 2019-03-23 16:20:40.000000000 -0600 -+++ src/sage/homology/homology_group.py 2019-04-08 13:33:22.436307576 -0600 +--- src/sage/homology/homology_group.py.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/sage/homology/homology_group.py 2019-06-27 11:46:03.614253830 -0600 @@ -109,7 +109,7 @@ class HomologyGroup_class(AdditiveAbelia sage: from sage.homology.homology_group import HomologyGroup sage: H = HomologyGroup(7, ZZ, [4,4,4,4,4,7,7]) @@ -22,36 +22,3 @@ diff -up src/sage/homology/homology_group.py.orig src/sage/homology/homology_gro sage: latex(HomologyGroup(6, ZZ)) \ZZ^{6} """ -diff -up src/sage/rings/function_field/differential.py.orig src/sage/rings/function_field/differential.py ---- src/sage/rings/function_field/differential.py.orig 2019-03-23 16:20:42.000000000 -0600 -+++ src/sage/rings/function_field/differential.py 2019-04-09 10:42:43.202792022 -0600 -@@ -360,7 +360,7 @@ class FunctionFieldDifferential_global(F - return to_R(c) - - def cartier(self): -- """ -+ r""" - Return the image of the differential by the Cartier operator. - - The Cartier operator operates on differentials. Let `x` be a separating -diff -up src/sage/rings/function_field/divisor.py.orig src/sage/rings/function_field/divisor.py ---- src/sage/rings/function_field/divisor.py.orig 2019-03-23 16:20:42.000000000 -0600 -+++ src/sage/rings/function_field/divisor.py 2019-04-09 10:42:22.061135616 -0600 -@@ -531,7 +531,7 @@ class FunctionFieldDivisor(ModuleElement - return basis, coordinates_func - - def basis_differential_space(self): -- """ -+ r""" - Return a basis of the space of differentials `\Omega(D)` - for the divisor `D`. - -@@ -554,7 +554,7 @@ class FunctionFieldDivisor(ModuleElement - return [W.element_class(W, f) for f in fbasis] - - def differential_space(self): -- """ -+ r""" - Return the vector space of the differential space `\Omega(D)` of the divisor `D`. - - OUTPUT: diff --git a/sagemath-extensions.patch b/sagemath-extensions.patch index ba0a447..01b43b2 100644 --- a/sagemath-extensions.patch +++ b/sagemath-extensions.patch @@ -1,6 +1,6 @@ -diff -up src/module_list.py.origsrc/module_list.py ---- src/module_list.py.orig 2018-12-22 16:37:06.000000000 -0700 -+++ src/module_list.py 2019-01-16 09:42:29.021226961 -0700 +diff -up src/module_list.py.orig src/module_list.py +--- src/module_list.py.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/module_list.py 2019-06-27 11:29:54.622601184 -0600 @@ -357,16 +357,16 @@ ext_modules = [ Extension('sage.graphs.matchpoly', sources = ['sage/graphs/matchpoly.pyx']), @@ -42,7 +42,7 @@ diff -up src/module_list.py.origsrc/module_list.py Extension('sage.graphs.spanning_tree', sources = ['sage/graphs/spanning_tree.pyx']), -@@ -460,21 +460,20 @@ ext_modules = [ +@@ -461,21 +461,20 @@ ext_modules = [ ## ################################ @@ -72,7 +72,7 @@ diff -up src/module_list.py.origsrc/module_list.py Extension('sage.libs.flint.flint', sources = ["sage/libs/flint/flint.pyx"], -@@ -840,10 +839,10 @@ ext_modules = [ +@@ -841,10 +840,10 @@ ext_modules = [ Extension('sage.matrix.matrix_window', sources = ['sage/matrix/matrix_window.pyx']), @@ -87,7 +87,7 @@ diff -up src/module_list.py.origsrc/module_list.py Extension('sage.matrix.misc', sources = ['sage/matrix/misc.pyx']), -@@ -1020,26 +1019,25 @@ ext_modules = [ +@@ -1021,26 +1020,25 @@ ext_modules = [ Extension("sage.numerical.backends.interactivelp_backend", ["sage/numerical/backends/interactivelp_backend.pyx"]), diff --git a/sagemath-fes.patch b/sagemath-fes.patch index 25c447b..4bb46d1 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 2019-01-16 09:45:43.332740109 -0700 -+++ src/module_list.py 2019-01-16 09:46:10.613250567 -0700 -@@ -470,10 +470,10 @@ ext_modules = [ +--- src/module_list.py.orig 2019-06-27 11:38:23.103196674 -0600 ++++ src/module_list.py 2019-06-27 11:44:42.052478294 -0600 +@@ -471,10 +471,10 @@ ext_modules = [ Extension('sage.libs.ecl', sources = ["sage/libs/ecl.pyx"]), diff --git a/sagemath-includes.patch b/sagemath-includes.patch index 11e9334..3ed9e79 100644 --- a/sagemath-includes.patch +++ b/sagemath-includes.patch @@ -1,6 +1,6 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2019-01-16 09:46:10.613250567 -0700 -+++ src/module_list.py 2019-01-16 09:47:07.804224297 -0700 +--- src/module_list.py.orig 2019-06-27 11:38:23.103196674 -0600 ++++ src/module_list.py 2019-06-27 11:47:48.026686317 -0600 @@ -44,6 +44,9 @@ zlib_libs = zlib_pc['libraries'] zlib_library_dirs = zlib_pc['library_dirs'] zlib_include_dirs = zlib_pc['include_dirs'] @@ -36,7 +36,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('*', sources = ['sage/algebras/finite_dimensional_algebras/*.pyx']), -@@ -523,7 +535,8 @@ ext_modules = [ +@@ -524,7 +536,8 @@ ext_modules = [ [])), Extension('sage.libs.lrcalc.lrcalc', @@ -46,7 +46,7 @@ diff -up src/module_list.py.orig src/module_list.py OptionalExtension("sage.libs.meataxe", sources = ['sage/libs/meataxe.pyx'], -@@ -545,23 +558,28 @@ ext_modules = [ +@@ -546,23 +559,28 @@ ext_modules = [ sources = ['sage/libs/readline.pyx'], libraries = ['readline']), @@ -80,7 +80,7 @@ diff -up src/module_list.py.orig src/module_list.py ################################### ## -@@ -569,7 +587,8 @@ ext_modules = [ +@@ -570,7 +588,8 @@ ext_modules = [ ## ################################### @@ -90,7 +90,7 @@ diff -up src/module_list.py.orig src/module_list.py ################################### ## -@@ -741,7 +760,8 @@ ext_modules = [ +@@ -742,7 +761,8 @@ ext_modules = [ Extension("sage.matrix.matrix_complex_ball_dense", ["sage/matrix/matrix_complex_ball_dense.pyx"], @@ -100,7 +100,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.matrix.matrix_complex_double_dense', sources = ['sage/matrix/matrix_complex_double_dense.pyx']), -@@ -749,6 +769,7 @@ ext_modules = [ +@@ -750,6 +770,7 @@ ext_modules = [ Extension('sage.matrix.matrix_cyclo_dense', sources = ['sage/matrix/matrix_cyclo_dense.pyx'], language = "c++", @@ -108,7 +108,7 @@ diff -up src/module_list.py.orig src/module_list.py libraries=['ntl']), Extension('sage.matrix.matrix_gap', -@@ -811,6 +832,7 @@ ext_modules = [ +@@ -812,6 +833,7 @@ ext_modules = [ sources = ['sage/matrix/matrix_modn_sparse.pyx']), Extension('sage.matrix.matrix_mpolynomial_dense', @@ -116,7 +116,7 @@ diff -up src/module_list.py.orig src/module_list.py sources = ['sage/matrix/matrix_mpolynomial_dense.pyx']), Extension('sage.matrix.matrix_polynomial_dense', -@@ -1108,7 +1130,8 @@ ext_modules = [ +@@ -1101,7 +1123,8 @@ ext_modules = [ language = 'c++'), Extension("sage.rings.complex_arb", @@ -126,7 +126,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.rings.complex_double', sources = ['sage/rings/complex_double.pyx'], -@@ -1184,7 +1207,8 @@ ext_modules = [ +@@ -1177,7 +1200,8 @@ ext_modules = [ sources = ['sage/rings/real_interval_absolute.pyx']), Extension("sage.rings.real_arb", @@ -136,7 +136,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.rings.real_lazy', sources = ['sage/rings/real_lazy.pyx']), -@@ -1267,6 +1291,7 @@ ext_modules = [ +@@ -1260,6 +1284,7 @@ ext_modules = [ Extension('sage.rings.number_field.number_field_element_quadratic', sources = ['sage/rings/number_field/number_field_element_quadratic.pyx'], @@ -144,7 +144,7 @@ diff -up src/module_list.py.orig src/module_list.py libraries=['ntl'], language = 'c++'), -@@ -1406,12 +1431,15 @@ ext_modules = [ +@@ -1399,12 +1424,15 @@ ext_modules = [ sources = ['sage/rings/polynomial/multi_polynomial.pyx']), Extension('sage.rings.polynomial.multi_polynomial_ideal_libsingular', @@ -160,7 +160,7 @@ diff -up src/module_list.py.orig src/module_list.py sources = ['sage/rings/polynomial/multi_polynomial_libsingular.pyx']), Extension('sage.rings.polynomial.multi_polynomial_ring_base', -@@ -1424,7 +1452,8 @@ ext_modules = [ +@@ -1417,7 +1445,8 @@ ext_modules = [ sources = ['sage/rings/polynomial/polydict.pyx']), Extension('sage.rings.polynomial.polynomial_complex_arb', @@ -171,9 +171,9 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.rings.polynomial.polynomial_compiled', sources = ['sage/rings/polynomial/polynomial_compiled.pyx']), diff -up src/setup.py.orig src/setup.py ---- src/setup.py.orig 2019-01-16 09:45:32.570933224 -0700 -+++ src/setup.py 2019-01-16 09:47:07.805224279 -0700 -@@ -85,6 +85,7 @@ except KeyError: +--- src/setup.py.orig 2019-06-27 11:38:14.984320180 -0600 ++++ src/setup.py 2019-06-27 11:47:48.027686302 -0600 +@@ -85,6 +85,7 @@ keep_going = False # search for dependencies and add to gcc -I include_dirs = sage_include_directories(use_sources=True) diff --git a/sagemath-lcalc.patch b/sagemath-lcalc.patch index 122c93c..1279dda 100644 --- a/sagemath-lcalc.patch +++ b/sagemath-lcalc.patch @@ -1,7 +1,7 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2019-01-16 09:42:41.397004883 -0700 -+++ src/module_list.py 2019-01-16 09:45:43.332740109 -0700 -@@ -513,7 +513,7 @@ ext_modules = [ +--- src/module_list.py.orig 2019-06-27 11:30:20.794201914 -0600 ++++ src/module_list.py 2019-06-27 11:38:23.103196674 -0600 +@@ -514,7 +514,7 @@ ext_modules = [ Extension('sage.libs.lcalc.lcalc_Lfunction', sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'], libraries = ['m', 'ntl', 'Lfunction'], diff --git a/sagemath-libgap.patch b/sagemath-libgap.patch index d7c5733..ff9976c 100644 --- a/sagemath-libgap.patch +++ b/sagemath-libgap.patch @@ -1,6 +1,6 @@ diff -up src/sage/env.py.orig src/sage/env.py ---- src/sage/env.py.orig 2019-04-08 12:21:12.403515647 -0600 -+++ src/sage/env.py 2019-04-08 12:22:37.165993394 -0600 +--- src/sage/env.py.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/sage/env.py 2019-06-27 11:39:02.780593101 -0600 @@ -174,7 +174,7 @@ var('CONWAY_POLYNOMIALS_DATA_DIR', joi var('GRAPHS_DATA_DIR', join(SAGE_SHARE, 'graphs')) var('ELLCURVE_DATA_DIR', join(SAGE_SHARE, 'ellcurves')) @@ -10,274 +10,3 @@ diff -up src/sage/env.py.orig src/sage/env.py var('THEBE_DIR', join(SAGE_SHARE, 'thebe')) var('COMBINATORIAL_DESIGN_DATA_DIR', join(SAGE_SHARE, 'combinatorial_designs')) var('CREMONA_MINI_DATA_DIR', join(SAGE_SHARE, 'cremona')) -diff -up src/sage/interfaces/tests.py.orig src/sage/interfaces/tests.py ---- src/sage/interfaces/tests.py.orig 2019-03-23 16:20:41.000000000 -0600 -+++ src/sage/interfaces/tests.py 2019-04-08 12:32:57.223857758 -0600 -@@ -33,7 +33,7 @@ Test that write errors to stderr are han - sage: kwds = dict(shell=True, stdout=f, stderr=f) - sage: subprocess.call("echo syntax error | ecl", **kwds) - 0 -- sage: subprocess.call("echo syntax error | gap", **kwds) -+ sage: subprocess.call("echo syntax error | gap", **kwds) in (0, 1) - 0 - sage: subprocess.call("echo syntax error | gp", **kwds) - 0 -diff -up src/sage/libs/gap/gap_includes.pxd.orig src/sage/libs/gap/gap_includes.pxd ---- src/sage/libs/gap/gap_includes.pxd.orig 2019-03-23 16:20:41.000000000 -0600 -+++ src/sage/libs/gap/gap_includes.pxd 2019-04-08 12:34:27.782231417 -0600 -@@ -76,18 +76,16 @@ cdef extern from "": - - - cdef extern from "": -- ctypedef void (*CallbackFunc)() -- void GAP_Initialize(int argc, char ** argv, char ** env, -- CallbackFunc, CallbackFunc) -+ """ -+ #define sig_GAP_Enter() {int t = GAP_Enter(); if (!t) sig_error();} -+ """ -+ ctypedef void (*GAP_CallbackFunc)() -+ void GAP_Initialize(int argc, char ** argv, -+ GAP_CallbackFunc markBagsCallback, GAP_CallbackFunc errorCallback, -+ int handleSignals) - Obj GAP_EvalString(const char *) except * - Obj GAP_EvalStringNoExcept "GAP_EvalString"(const char *) - Obj GAP_ValueGlobalVariable(const char *) -- -- --cdef extern from "" nogil: -- """ -- #define sig_GAP_Enter() {int t = GAP_Enter(); if (!t) sig_error();} -- """ - cdef void GAP_EnterStack() - cdef void GAP_LeaveStack() - cdef int GAP_Enter() except 0 -@@ -121,26 +119,31 @@ cdef extern from "": - UInt TNUM_OBJ(Obj obj) - char* TNAM_OBJ(Obj obj) - -- cdef int T_INTPOS -- cdef int T_INTNEG -- cdef int T_RAT -- cdef int T_CYC -- cdef int T_FFE -- cdef int T_PERM2 -- cdef int T_PERM4 -- cdef int T_BOOL -- cdef int T_CHAR -- cdef int T_FUNCTION -- cdef int T_MACFLOAT -- cdef int T_PLIST -- cdef int T_PLIST_CYC -- cdef int T_BLIST -- cdef int T_STRING -- cdef int T_COMOBJ -- cdef int T_POSOBJ -- cdef int T_DATOBJ -- cdef int T_WPOBJ -- -+ cdef enum TNUM: -+ T_INT -+ T_INTPOS -+ T_INTNEG -+ T_RAT -+ T_CYC -+ T_FFE -+ T_MACFLOAT -+ T_PERM2 -+ T_PERM4 -+ T_TRANS2 -+ T_TRANS4 -+ T_PPERM2 -+ T_PPERM4 -+ T_BOOL -+ T_CHAR -+ T_FUNCTION -+ T_PLIST -+ T_PLIST_CYC -+ T_BLIST -+ T_STRING -+ T_COMOBJ -+ T_POSOBJ -+ T_DATOBJ -+ T_WPOBJ - - cdef extern from "": - Obj NEW_PREC(int len) -diff -up src/sage/libs/gap/libgap.pyx.orig src/sage/libs/gap/libgap.pyx ---- src/sage/libs/gap/libgap.pyx.orig 2019-03-23 16:20:41.000000000 -0600 -+++ src/sage/libs/gap/libgap.pyx 2019-04-08 12:25:35.700787082 -0600 -@@ -233,14 +233,6 @@ from sage.misc.superseded import depreca - ############################################################################ - - --cdef void report(Obj bag): -- print(TNAM_OBJ(bag), SIZE_OBJ(bag)) -- -- --cdef void print_gasman_objects(): -- CallbackForAllBags(report) -- -- - from sage.misc.lazy_import import is_during_startup - if is_during_startup(): - import sys, traceback -diff -up src/sage/libs/gap/util.pyx.orig src/sage/libs/gap/util.pyx ---- src/sage/libs/gap/util.pyx.orig 2019-03-23 16:20:41.000000000 -0600 -+++ src/sage/libs/gap/util.pyx 2019-04-08 12:37:02.323035697 -0600 -@@ -14,19 +14,16 @@ Utility functions for GAP - - from __future__ import print_function, absolute_import - --import os --import signal --import warnings -+from libc.signal cimport signal, SIGCHLD, SIG_DFL - from posix.dlfcn cimport dlopen, dlclose, RTLD_NOW, RTLD_GLOBAL --from libc.string cimport strcpy, strlen - - from cpython.exc cimport PyErr_Fetch, PyErr_Restore - from cpython.object cimport Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE - from cpython.ref cimport PyObject, Py_XINCREF, Py_XDECREF --from cysignals.memory cimport sig_malloc --from cysignals.pysignals import containsignals --from cysignals.signals cimport sig_on, sig_off, sig_error -+from cysignals.signals cimport sig_on, sig_off - -+import os -+import warnings - import sage.env - - from .gap_includes cimport * -@@ -105,7 +102,7 @@ cdef class ObjWrapper(object): - sage: hash(x) - 0 - """ -- return (self.value) -+ return (self.value) - - - cdef ObjWrapper wrap_obj(Obj obj): -@@ -178,7 +175,7 @@ def gap_root(): - - sage: from sage.libs.gap.util import gap_root - sage: gap_root() # random output -- '/home/vbraun/opt/sage-5.3.rc0/local/gap/latest' -+ '/usr/lib/gap' - """ - if os.path.exists(sage.env.GAP_ROOT_DIR): - return sage.env.GAP_ROOT_DIR -@@ -197,7 +194,6 @@ def gap_root(): - - # To ensure that we call initialize_libgap only once. - cdef bint _gap_is_initialized = False --cdef extern char **environ - - - cdef char* _reset_error_output_cmd = """\ -@@ -216,33 +212,6 @@ MakeImmutable(libgap_errout); - """ - - --cdef char** copy_environ(char** env): -- """ -- Make a copy of the environment block given by ``env``. -- -- Returns a pointer to the copy, which is the caller's responsibility to -- free. -- """ -- -- cdef char** env_copy -- cdef int envc = 0; -- cdef int idx -- cdef size_t size -- -- while env[envc]: -- envc += 1 -- -- env_copy = sig_malloc((envc + 1) * sizeof(char*)) -- -- for idx in range(envc): -- size = strlen(env[idx]) + 1 -- env_copy[idx] = sig_malloc(size) -- strcpy(env_copy[idx], env[idx]) -- -- env_copy[envc] = NULL -- return env_copy -- -- - cdef initialize(): - """ - Initialize the GAP library, if it hasn't already been -@@ -253,25 +222,23 @@ cdef initialize(): - sage: libgap(123) # indirect doctest - 123 - """ -- global _gap_is_initialized, environ -+ global _gap_is_initialized - if _gap_is_initialized: return - # Hack to ensure that all symbols provided by libgap are loaded into the - # global symbol table - # Note: we could use RTLD_NOLOAD and avoid the subsequent dlclose() but - # this isn't portable - cdef void* handle -- libgapname = str_to_bytes(sage.env.GAP_SO) -- handle = dlopen(libgapname, RTLD_NOW | RTLD_GLOBAL) -+ handle = dlopen("libgap.so", RTLD_NOW | RTLD_GLOBAL) - if handle is NULL: - raise RuntimeError( - "Could not dlopen() libgap even though it should already " - "be loaded!") - dlclose(handle) - -- # Define argv and environ variables, which we will pass in to -+ # Define argv variable, which we will pass in to - # initialize GAP. Note that we must pass define the memory pool - # size! -- cdef char** env - cdef char* argv[18] - argv[0] = "sage" - argv[1] = "-l" -@@ -318,21 +285,15 @@ cdef initialize(): - - argv[argc] = NULL - -- env = copy_environ(environ) -+ sig_on() -+ # Initialize GAP but disable their SIGINT handler -+ GAP_Initialize(argc, argv, gasman_callback, error_handler, -+ handleSignals=False) -+ sig_off() - -- # Need to save/restore current SIGINT handling since GAP_Initialize -- # currently clobbers it; it doesn't matter what we set SIGINT to -- # temporarily. -- with containsignals(): -- sig_on() -- try: -- # Initialize GAP and capture any error messages. The -- # initialization just prints any errors and does not -- # use the error handler. -- GAP_Initialize(argc, argv, env, &gasman_callback, -- &error_handler) -- finally: -- sig_off() -+ # Disable GAP's SIGCHLD handler ChildStatusChanged(), which calls -+ # waitpid() on random child processes. -+ signal(SIGCHLD, SIG_DFL) - - # Set the ERROR_OUTPUT global in GAP to an output stream in which to - # receive error output -diff -up src/sage/tests/books/judson-abstract-algebra/sylow-sage.py.orig src/sage/tests/books/judson-abstract-algebra/sylow-sage.py ---- src/sage/tests/books/judson-abstract-algebra/sylow-sage.py.orig 2019-03-23 16:20:43.000000000 -0600 -+++ src/sage/tests/books/judson-abstract-algebra/sylow-sage.py 2019-04-08 12:37:39.859183332 -0600 -@@ -225,8 +225,8 @@ r""" - - ~~~~~~~~~~~~~~~~~~~~~~ :: - -- sage: gap.version() -- '4.10.0' -+ sage: gap.version() # random -+ '4.10.1' - - ~~~~~~~~~~~~~~~~~~~~~~ :: - diff --git a/sagemath-nauty.patch b/sagemath-nauty.patch index 9f01c6b..bf4eaf1 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 2018-12-22 16:37:08.000000000 -0700 -+++ src/sage/graphs/graph_generators.py 2019-01-16 09:45:21.999122930 -0700 -@@ -924,7 +924,7 @@ class GraphGenerators(): +--- src/sage/graphs/graph_generators.py.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/sage/graphs/graph_generators.py 2019-06-27 11:37:46.100759559 -0600 +@@ -907,7 +907,7 @@ class GraphGenerators(): else: enc_kwargs = {'encoding': 'latin-1'} diff --git a/sagemath-python3.patch b/sagemath-python3.patch index 1dd9d82..28cc7bf 100644 --- a/sagemath-python3.patch +++ b/sagemath-python3.patch @@ -44,8 +44,8 @@ diff -up build/pkgs/sagenb/src/sagenb/notebook/wiki2html.py.orig build/pkgs/sage 'punct': punct_pattern, } diff -up build/pkgs/sagetex/src/extractsagecode.py.orig build/pkgs/sagetex/src/extractsagecode.py ---- build/pkgs/sagetex/src/extractsagecode.py.orig 2019-04-08 11:59:49.261545925 -0600 -+++ build/pkgs/sagetex/src/extractsagecode.py 2019-04-08 12:04:16.915757233 -0600 +--- build/pkgs/sagetex/src/extractsagecode.py.orig 2019-01-09 09:51:28.000000000 -0700 ++++ build/pkgs/sagetex/src/extractsagecode.py 2019-06-27 11:33:54.098080502 -0600 @@ -45,7 +45,7 @@ See the SageTeX documentation for more d try: @@ -56,8 +56,8 @@ diff -up build/pkgs/sagetex/src/extractsagecode.py.orig build/pkgs/sagetex/src/e usage() sys.exit(2) diff -up build/pkgs/sagetex/src/makestatic.py.orig build/pkgs/sagetex/src/makestatic.py ---- build/pkgs/sagetex/src/makestatic.py.orig 2019-04-08 11:59:49.262545907 -0600 -+++ build/pkgs/sagetex/src/makestatic.py 2019-04-08 12:04:42.619295492 -0600 +--- build/pkgs/sagetex/src/makestatic.py.orig 2019-01-09 09:51:28.000000000 -0700 ++++ build/pkgs/sagetex/src/makestatic.py 2019-06-27 11:33:54.098080502 -0600 @@ -45,7 +45,7 @@ See the SageTeX documentation for more d try: @@ -133,9 +133,9 @@ diff -up build/pkgs/sagetex/src/remote-sagetex.py.orig build/pkgs/sagetex/src/re if not password: from getpass import getpass diff -up src/doc/common/conf.py.orig src/doc/common/conf.py ---- src/doc/common/conf.py.orig 2019-03-23 16:20:31.000000000 -0600 -+++ src/doc/common/conf.py 2019-04-08 12:05:07.088855913 -0600 -@@ -547,7 +547,7 @@ skip_picklability_check_modules = [ +--- src/doc/common/conf.py.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/doc/common/conf.py 2019-06-27 11:33:54.099080488 -0600 +@@ -566,7 +566,7 @@ skip_picklability_check_modules = [ #'sage.misc.nested_class_test', # for test only 'sage.misc.latex', 'sage.misc.explain_pickle', @@ -144,7 +144,7 @@ diff -up src/doc/common/conf.py.orig src/doc/common/conf.py ] def check_nested_class_picklability(app, what, name, obj, skip, options): -@@ -596,7 +596,7 @@ def skip_member(app, what, name, obj, sk +@@ -615,7 +615,7 @@ def skip_member(app, what, name, obj, sk if 'SAGE_CHECK_NESTED' in os.environ: check_nested_class_picklability(app, what, name, obj, skip, options) @@ -154,18 +154,18 @@ diff -up src/doc/common/conf.py.orig src/doc/common/conf.py objname = getattr(obj, "__name__", None) diff -up src/sage/combinat/finite_state_machine.py.orig src/sage/combinat/finite_state_machine.py ---- src/sage/combinat/finite_state_machine.py.orig 2019-03-23 16:20:38.000000000 -0600 -+++ src/sage/combinat/finite_state_machine.py 2019-04-08 12:05:07.090855877 -0600 -@@ -932,7 +932,7 @@ import six - from six.moves import range, zip_longest, zip +--- src/sage/combinat/finite_state_machine.py.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/sage/combinat/finite_state_machine.py 2019-06-27 11:36:38.804783269 -0600 +@@ -936,7 +936,7 @@ from six.moves import range, zip_longest from six import itervalues + from IPython.lib.pretty import pretty -import collections -+import collections.abc ++import collections, collections.abc import itertools from copy import copy, deepcopy -@@ -14201,7 +14201,7 @@ def is_FSMProcessIterator(PI): +@@ -14207,7 +14207,7 @@ def is_FSMProcessIterator(PI): class FSMProcessIterator(SageObject, @@ -175,8 +175,8 @@ diff -up src/sage/combinat/finite_state_machine.py.orig src/sage/combinat/finite This class takes an input, feeds it into a finite state machine (automaton or transducer, in particular), tests whether this was diff -up src/sage/cpython/dict_del_by_value.pyx.orig src/sage/cpython/dict_del_by_value.pyx ---- src/sage/cpython/dict_del_by_value.pyx.orig 2019-03-23 16:20:40.000000000 -0600 -+++ src/sage/cpython/dict_del_by_value.pyx 2019-04-08 12:05:07.091855859 -0600 +--- src/sage/cpython/dict_del_by_value.pyx.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/sage/cpython/dict_del_by_value.pyx 2019-06-27 11:33:54.103080432 -0600 @@ -347,8 +347,8 @@ ELIF PY_VERSION_HEX>=0x03060000: cdef MyPyDictKeysObject * keys = (mp.ma_keys) cdef size_t perturb @@ -189,8 +189,8 @@ diff -up src/sage/cpython/dict_del_by_value.pyx.orig src/sage/cpython/dict_del_b if mp.ma_values != NULL: print ("del_dictitem_by_exact_value cannot be applied to a shared key dict") diff -up src/sage/geometry/triangulation/point_configuration.py.orig src/sage/geometry/triangulation/point_configuration.py ---- src/sage/geometry/triangulation/point_configuration.py.orig 2019-03-23 16:20:40.000000000 -0600 -+++ src/sage/geometry/triangulation/point_configuration.py 2019-04-08 12:05:07.091855859 -0600 +--- src/sage/geometry/triangulation/point_configuration.py.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/sage/geometry/triangulation/point_configuration.py 2019-06-27 11:33:54.103080432 -0600 @@ -623,7 +623,7 @@ class PointConfiguration(UniqueRepresent ['{{0,1,2,4},{1,2,3,4}}'] """ @@ -201,8 +201,8 @@ diff -up src/sage/geometry/triangulation/point_configuration.py.orig src/sage/ge proc.expect(r'\.\.\. done\.') proc.setecho(0) diff -up src/sage/interfaces/frobby.py.orig src/sage/interfaces/frobby.py ---- src/sage/interfaces/frobby.py.orig 2019-03-23 16:20:40.000000000 -0600 -+++ src/sage/interfaces/frobby.py 2019-04-08 12:05:07.091855859 -0600 +--- src/sage/interfaces/frobby.py.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/sage/interfaces/frobby.py 2019-06-27 11:33:54.103080432 -0600 @@ -77,7 +77,7 @@ class Frobby: print("Frobby command: ", repr(command)) print("Frobby input:\n", input) @@ -213,8 +213,8 @@ diff -up src/sage/interfaces/frobby.py.orig src/sage/interfaces/frobby.py if verbose: diff -up src/sage/interfaces/gfan.py.orig src/sage/interfaces/gfan.py ---- src/sage/interfaces/gfan.py.orig 2019-03-23 16:20:41.000000000 -0600 -+++ src/sage/interfaces/gfan.py 2019-04-08 12:05:07.092855841 -0600 +--- src/sage/interfaces/gfan.py.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/sage/interfaces/gfan.py 2019-06-27 11:33:54.104080419 -0600 @@ -66,7 +66,7 @@ class Gfan(object): if six.PY2: enc_kwargs = {} @@ -225,8 +225,8 @@ diff -up src/sage/interfaces/gfan.py.orig src/sage/interfaces/gfan.py gfan_processes = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, **enc_kwargs) diff -up src/sage/interfaces/gp.py.orig src/sage/interfaces/gp.py ---- src/sage/interfaces/gp.py.orig 2019-03-23 16:20:41.000000000 -0600 -+++ src/sage/interfaces/gp.py 2019-04-08 12:05:07.092855841 -0600 +--- src/sage/interfaces/gp.py.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/sage/interfaces/gp.py 2019-06-27 11:33:54.104080419 -0600 @@ -934,17 +934,6 @@ class GpElement(ExpectElement): """ return repr(self.type()) == 't_STR' @@ -246,8 +246,8 @@ diff -up src/sage/interfaces/gp.py.orig src/sage/interfaces/gp.py """ Return Python float. diff -up src/sage/interfaces/latte.py.orig src/sage/interfaces/latte.py ---- src/sage/interfaces/latte.py.orig 2019-03-23 16:20:41.000000000 -0600 -+++ src/sage/interfaces/latte.py 2019-04-08 12:05:07.092855841 -0600 +--- src/sage/interfaces/latte.py.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/sage/interfaces/latte.py 2019-06-27 11:33:54.104080419 -0600 @@ -148,6 +148,7 @@ def count(arg, ehrhart_polynomial=False, latte_proc = Popen(args, stdin=PIPE, stdout=PIPE, @@ -265,8 +265,8 @@ diff -up src/sage/interfaces/latte.py.orig src/sage/interfaces/latte.py ans, err = latte_proc.communicate(arg) diff -up src/sage/interfaces/sagespawn.pyx.orig src/sage/interfaces/sagespawn.pyx ---- src/sage/interfaces/sagespawn.pyx.orig 2019-03-23 16:20:41.000000000 -0600 -+++ src/sage/interfaces/sagespawn.pyx 2019-04-08 12:05:07.092855841 -0600 +--- src/sage/interfaces/sagespawn.pyx.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/sage/interfaces/sagespawn.pyx 2019-06-27 11:33:54.104080419 -0600 @@ -1,6 +1,6 @@ """ Sage wrapper around pexpect's ``spawn`` class and @@ -315,8 +315,8 @@ diff -up src/sage/interfaces/sagespawn.pyx.orig src/sage/interfaces/sagespawn.py pass self.fileobj.close() diff -up src/sage/misc/parser.pyx.orig src/sage/misc/parser.pyx ---- src/sage/misc/parser.pyx.orig 2019-03-23 16:20:41.000000000 -0600 -+++ src/sage/misc/parser.pyx 2019-04-08 12:05:07.093855823 -0600 +--- src/sage/misc/parser.pyx.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage/misc/parser.pyx 2019-06-27 11:33:54.105080405 -0600 @@ -96,7 +96,7 @@ def token_to_str(int token): @@ -616,8 +616,8 @@ diff -up src/sage/misc/parser.pyx.orig src/sage/misc/parser.pyx return self.p_list(tokens) else: diff -up src/sage/plot/plot3d/plot3d.py.orig src/sage/plot/plot3d/plot3d.py ---- src/sage/plot/plot3d/plot3d.py.orig 2019-03-23 16:20:42.000000000 -0600 -+++ src/sage/plot/plot3d/plot3d.py 2019-04-08 12:05:07.093855823 -0600 +--- src/sage/plot/plot3d/plot3d.py.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage/plot/plot3d/plot3d.py 2019-06-27 11:33:54.105080405 -0600 @@ -188,7 +188,8 @@ class _Coordinates(object): sage: arb((x+z,y*z,z), z, (x,y)) Arbitrary Coordinates coordinate transform (z in terms of x, y) @@ -629,8 +629,8 @@ diff -up src/sage/plot/plot3d/plot3d.py.orig src/sage/plot/plot3d/plot3d.py raise ValueError('variables were specified incorrectly for this coordinate system; incorrect variables were %s'%list(set(all_vars).symmetric_difference(set(indep_vars+[dep_var])))) self.dep_var = dep_var diff -up src/sage/plot/point.py.orig src/sage/plot/point.py ---- src/sage/plot/point.py.orig 2019-03-23 16:20:42.000000000 -0600 -+++ src/sage/plot/point.py 2019-04-08 12:05:07.094855805 -0600 +--- src/sage/plot/point.py.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage/plot/point.py 2019-06-27 11:33:54.105080405 -0600 @@ -29,7 +29,7 @@ TESTS:: from sage.misc.decorators import options, rename_keyword from sage.plot.colors import to_mpl_color @@ -650,8 +650,8 @@ diff -up src/sage/plot/point.py.orig src/sage/plot/point.py try: diff -up src/sage/repl/display/fancy_repr.py.orig src/sage/repl/display/fancy_repr.py ---- src/sage/repl/display/fancy_repr.py.orig 2019-03-23 16:20:42.000000000 -0600 -+++ src/sage/repl/display/fancy_repr.py 2019-04-08 12:05:07.094855805 -0600 +--- src/sage/repl/display/fancy_repr.py.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage/repl/display/fancy_repr.py 2019-06-27 11:33:54.106080391 -0600 @@ -15,7 +15,7 @@ Representations of objects. import types @@ -671,8 +671,8 @@ diff -up src/sage/repl/display/fancy_repr.py.orig src/sage/repl/display/fancy_re else: # A user-provided repr. Find newlines and replace them with p.break_() diff -up src/sage/repl/ipython_kernel/interact.py.orig src/sage/repl/ipython_kernel/interact.py ---- src/sage/repl/ipython_kernel/interact.py.orig 2019-03-23 16:20:42.000000000 -0600 -+++ src/sage/repl/ipython_kernel/interact.py 2019-04-08 12:05:07.094855805 -0600 +--- src/sage/repl/ipython_kernel/interact.py.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage/repl/ipython_kernel/interact.py 2019-06-27 11:33:54.106080391 -0600 @@ -35,7 +35,8 @@ EXAMPLES:: from ipywidgets.widgets import SelectionSlider, ValueWidget, ToggleButtons @@ -681,11 +681,11 @@ diff -up src/sage/repl/ipython_kernel/interact.py.orig src/sage/repl/ipython_ker +from collections.abc import Iterable, Iterator +from collections import OrderedDict from .widgets import EvalText, SageColorPicker + from .widgets_sagenb import input_grid from sage.structure.element import parent - from sage.symbolic.ring import SR diff -up src/sage/rings/integer.pyx.orig src/sage/rings/integer.pyx ---- src/sage/rings/integer.pyx.orig 2019-03-23 16:20:42.000000000 -0600 -+++ src/sage/rings/integer.pyx 2019-04-08 12:05:07.095855787 -0600 +--- src/sage/rings/integer.pyx.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage/rings/integer.pyx 2019-06-27 11:33:54.107080377 -0600 @@ -6989,7 +6989,7 @@ cdef int mpz_set_str_python(mpz_ptr z, c while x[0] == c' ': x += 1 # Strip spaces @@ -696,9 +696,9 @@ diff -up src/sage/rings/integer.pyx.orig src/sage/rings/integer.pyx assert base >= 2 diff -up src/sage/rings/polynomial/pbori.pyx.orig src/sage/rings/polynomial/pbori.pyx ---- src/sage/rings/polynomial/pbori.pyx.orig 2019-03-23 16:20:42.000000000 -0600 -+++ src/sage/rings/polynomial/pbori.pyx 2019-04-08 12:05:07.096855769 -0600 -@@ -4774,8 +4774,7 @@ cdef class PolynomialConstruct: +--- src/sage/rings/polynomial/pbori.pyx.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage/rings/polynomial/pbori.pyx 2019-06-27 11:33:54.123080154 -0600 +@@ -4765,8 +4765,7 @@ cdef class PolynomialConstruct: # So, it is just a conversion. [Simon King] return (ring)._element_constructor_(x) @@ -709,8 +709,8 @@ diff -up src/sage/rings/polynomial/pbori.pyx.orig src/sage/rings/polynomial/pbor cdef class MonomialConstruct: diff -up src/sage/rings/real_mpfi.pyx.orig src/sage/rings/real_mpfi.pyx ---- src/sage/rings/real_mpfi.pyx.orig 2019-03-23 16:20:42.000000000 -0600 -+++ src/sage/rings/real_mpfi.pyx 2019-04-08 12:05:07.097855751 -0600 +--- src/sage/rings/real_mpfi.pyx.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage/rings/real_mpfi.pyx 2019-06-27 11:33:54.124080141 -0600 @@ -1943,12 +1943,12 @@ cdef class RealIntervalFieldElement(Ring cdef long digits @@ -736,8 +736,8 @@ diff -up src/sage/rings/real_mpfi.pyx.orig src/sage/rings/real_mpfi.pyx mant_string = bytes_to_str(tmp_cstr+1) sign_string = bytes_to_str(b'-') diff -up src/sage/rings/real_mpfr.pyx.orig src/sage/rings/real_mpfr.pyx ---- src/sage/rings/real_mpfr.pyx.orig 2019-03-23 16:20:42.000000000 -0600 -+++ src/sage/rings/real_mpfr.pyx 2019-04-08 12:05:07.098855733 -0600 +--- src/sage/rings/real_mpfr.pyx.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage/rings/real_mpfr.pyx 2019-06-27 11:33:54.125080127 -0600 @@ -2039,7 +2039,7 @@ cdef class RealNumber(sage.structure.ele if s is NULL: raise RuntimeError("unable to convert an mpfr number to a string") @@ -748,8 +748,8 @@ diff -up src/sage/rings/real_mpfr.pyx.orig src/sage/rings/real_mpfr.pyx t = char_to_str(s + 1) else: diff -up src/sage/structure/sage_object.pyx.orig src/sage/structure/sage_object.pyx ---- src/sage/structure/sage_object.pyx.orig 2019-03-23 16:20:43.000000000 -0600 -+++ src/sage/structure/sage_object.pyx 2019-04-08 12:05:07.098855733 -0600 +--- src/sage/structure/sage_object.pyx.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage/structure/sage_object.pyx 2019-06-27 11:33:54.126080113 -0600 @@ -665,7 +665,7 @@ cdef class SageObject: try: s = self._interface_init_(I) @@ -760,9 +760,9 @@ diff -up src/sage/structure/sage_object.pyx.orig src/sage/structure/sage_object. if c: try: diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx ---- src/sage/symbolic/expression.pyx.orig 2019-03-23 16:20:43.000000000 -0600 -+++ src/sage/symbolic/expression.pyx 2019-04-08 12:05:07.100855697 -0600 -@@ -12915,7 +12915,7 @@ cdef class hold_class: +--- src/sage/symbolic/expression.pyx.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage/symbolic/expression.pyx 2019-06-27 11:33:54.128080085 -0600 +@@ -12960,7 +12960,7 @@ cdef class hold_class: sage: SR(2)^5 32 """ @@ -771,7 +771,7 @@ diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx def __exit__(self, *args): """ -@@ -12928,7 +12928,7 @@ cdef class hold_class: +@@ -12973,7 +12973,7 @@ cdef class hold_class: sage: SR(2)^5 32 """ @@ -781,8 +781,8 @@ diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx def start(self): """ diff -up src/setup.py.orig src/setup.py ---- src/setup.py.orig 2019-04-08 11:45:58.283274716 -0600 -+++ src/setup.py 2019-04-08 12:05:07.101855679 -0600 +--- src/setup.py.orig 2019-06-27 11:30:20.794201914 -0600 ++++ src/setup.py 2019-06-27 11:33:54.128080085 -0600 @@ -232,7 +232,7 @@ class sage_build_cython(Command): cdivision=True, embedsignature=True, diff --git a/sagemath-readonly.patch b/sagemath-readonly.patch index 9b30f80..4031056 100644 --- a/sagemath-readonly.patch +++ b/sagemath-readonly.patch @@ -1,13 +1,13 @@ diff -up src/sage/all.py.orig src/sage/all.py ---- src/sage/all.py.orig 2018-12-22 16:37:06.000000000 -0700 -+++ src/sage/all.py 2019-01-16 09:43:07.639533969 -0700 -@@ -284,11 +284,11 @@ def _write_started_file(): - - Check that the file exists when Sage is running:: +--- src/sage/all.py.orig 2019-06-27 11:31:07.149494781 -0600 ++++ src/sage/all.py 2019-06-27 11:32:11.332515672 -0600 +@@ -286,11 +286,11 @@ def _write_started_file(): + Check that the file exists when Sage is running (note, this file is not + necessarily installed or used by downstream packages of Sage):: - sage: started_file = os.path.join(SAGE_LOCAL, 'etc', 'sage-started.txt') + sage: started_file = os.path.join(DOT_SAGE, 'sage-started.txt') - sage: os.path.isfile(started_file) + sage: os.path.isfile(started_file) # optional - build True """ - started_file = os.path.join(SAGE_LOCAL, 'etc', 'sage-started.txt') diff --git a/sagemath-rpmbuild.patch b/sagemath-rpmbuild.patch index d826315..2af74dd 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 2019-04-08 11:45:44.437520141 -0600 -+++ src/module_list.py 2019-04-08 11:45:58.268274982 -0600 +--- src/module_list.py.orig 2019-06-27 11:29:54.622601184 -0600 ++++ src/module_list.py 2019-06-27 11:30:20.794201914 -0600 @@ -2,7 +2,7 @@ import os from distutils.extension import Extension from sage.env import SAGE_LOCAL @@ -11,8 +11,8 @@ 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 2019-04-08 11:45:58.269274964 -0600 -+++ src/sage/misc/cython.py 2019-04-08 11:48:23.582699337 -0600 +--- src/sage/misc/cython.py.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage/misc/cython.py 2019-06-27 11:30:20.794201914 -0600 @@ -49,7 +49,7 @@ standard_libs = [ ] + cblas_libs + [ 'ntl'] @@ -23,8 +23,8 @@ diff -up src/sage/misc/cython.py.orig src/sage/misc/cython.py ################################################################ diff -up src/setup.py.orig src/setup.py ---- src/setup.py.orig 2019-03-23 16:20:43.000000000 -0600 -+++ src/setup.py 2019-04-08 11:45:58.283274716 -0600 +--- src/setup.py.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/setup.py 2019-06-27 11:30:20.794201914 -0600 @@ -318,9 +318,8 @@ class sage_build_cython(Command): # Debugging gdb_debug=self.debug, @@ -37,7 +37,7 @@ diff -up src/setup.py.orig src/setup.py ) # Filter out extensions with skip_build=True -@@ -829,9 +828,6 @@ class sage_install(install): +@@ -795,9 +794,6 @@ class sage_install(install): install.run(self) self.install_kernel_spec() log.info('Cleaning up stale installed files....') @@ -47,7 +47,7 @@ diff -up src/setup.py.orig src/setup.py def install_kernel_spec(self): """ -@@ -848,40 +844,6 @@ class sage_install(install): +@@ -814,40 +810,6 @@ class sage_install(install): # the install_data directory for installing our Jupyter files. SageKernelSpec.update(prefix=self.install_data) diff --git a/sagemath-sagedoc.patch b/sagemath-sagedoc.patch index e189517..223bfdb 100644 --- a/sagemath-sagedoc.patch +++ b/sagemath-sagedoc.patch @@ -1,6 +1,6 @@ diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py ---- src/sage/doctest/control.py.orig 2019-03-23 16:20:40.000000000 -0600 -+++ src/sage/doctest/control.py 2019-04-08 11:49:50.428160023 -0600 +--- src/sage/doctest/control.py.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/sage/doctest/control.py 2019-06-27 11:30:37.222951288 -0600 @@ -106,7 +106,6 @@ class DocTestDefaults(SageObject): self.valgrind = False self.massif = False @@ -46,8 +46,8 @@ 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 2019-03-23 16:20:41.000000000 -0600 -+++ src/sage/interfaces/singular.py 2019-04-08 11:54:23.579318505 -0600 +--- src/sage/interfaces/singular.py.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage/interfaces/singular.py 2019-06-27 11:30:37.223951272 -0600 @@ -2261,7 +2261,7 @@ def generate_docstring_dictionary(): nodes.clear() node_names.clear() @@ -70,9 +70,9 @@ diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py m = re.match(new_node,line) if m: 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 2019-03-23 16:20:43.000000000 -0600 -+++ src/sage_setup/docbuild/ext/multidocs.py 2019-04-08 11:49:50.430159987 -0600 -@@ -84,8 +84,11 @@ def merge_environment(app, env): +--- src/sage_setup/docbuild/ext/multidocs.py.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage_setup/docbuild/ext/multidocs.py 2019-06-27 11:30:37.224951257 -0600 +@@ -85,8 +85,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, dict()) @@ -87,9 +87,9 @@ diff -up src/sage_setup/docbuild/ext/multidocs.py.orig src/sage_setup/docbuild/e newcite = {} citations = docenv.domaindata["std"]["citations"] diff -up src/sage_setup/docbuild/__init__.py.orig src/sage_setup/docbuild/__init__.py ---- src/sage_setup/docbuild/__init__.py.orig 2019-04-08 11:49:50.431159970 -0600 -+++ src/sage_setup/docbuild/__init__.py 2019-04-08 11:56:02.609563240 -0600 -@@ -287,13 +287,14 @@ if not (CYGWIN_VERSION and CYGWIN_VERSIO +--- src/sage_setup/docbuild/__init__.py.orig 2019-06-26 14:41:05.000000000 -0600 ++++ src/sage_setup/docbuild/__init__.py 2019-06-27 11:30:37.225951242 -0600 +@@ -284,13 +284,14 @@ if not (CYGWIN_VERSION and CYGWIN_VERSIO # map_async handles KeyboardInterrupt correctly. Plain map and # apply_async does not, so don't use it. x = pool.map_async(target, args, 1) diff --git a/sagemath-scripts.patch b/sagemath-scripts.patch index e2eea68..68cbfd5 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 2019-03-23 16:20:31.000000000 -0600 -+++ src/bin/sage 2019-04-08 11:42:38.305818631 -0600 +--- src/bin/sage.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/bin/sage 2019-06-27 11:28:35.352810438 -0600 @@ -26,13 +26,10 @@ usage() { echo " file.[sage|py|spyx] -- run given .sage, .py or .spyx file" echo " -advanced -- list all command line options" @@ -166,7 +166,7 @@ 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'." -@@ -287,115 +205,6 @@ usage_advanced() { +@@ -287,116 +205,6 @@ usage_advanced() { ##################################################################### @@ -193,7 +193,7 @@ diff -up src/bin/sage.orig src/bin/sage - # We set PYTHONPATH to that directory such that the system Python - # should also find the sage_patchbot package. - cmd='import sage_patchbot as p; import os; print(os.path.dirname(p.__path__[0]))' -- export PYTHONPATH=`"$SAGE_ROOT/sage" --python -c "$cmd"` +- export PYTHONPATH=`"$SAGE_ROOT/sage" --python3 -c "$cmd"` - if [ -z "$PYTHONPATH" ]; then - # Something went wrong, assume that the patchbot is not installed - echo >&2 "Error: cannot find installation path for sage_patchbot" @@ -201,13 +201,10 @@ diff -up src/bin/sage.orig src/bin/sage - exit 1 - fi - -- # Try "python2.7", then "python2", then "python" - shopt -s execfail # Do not exit if "exec" fails -- exec python2.7 -m sage_patchbot.patchbot "$@" -- exec python2 -m sage_patchbot.patchbot "$@" -- exec python -m sage_patchbot.patchbot "$@" -- echo >&2 "Error: cannot find a suitable Python program." -- echo >&2 "The SageMath patchbot requires a system Python installation." +- exec python3 -m sage_patchbot.patchbot "$@" +- echo >&2 "Error: cannot find a suitable Python 3 program." +- echo >&2 "The SageMath patchbot requires a system Python 3 installation." - exit 127 -fi - @@ -274,6 +271,10 @@ diff -up src/bin/sage.orig src/bin/sage - fi - $MAKE SAGE_SPKG="sage-spkg $INSTALL_OPTIONS" "$PKG" - done +- +- echo "New packages may have been installed." +- echo "Re-running configure and make in case any dependent packages need updating." +- touch "$SAGE_ROOT/configure" && $MAKE all-build - exit 0 -fi - @@ -282,7 +283,7 @@ diff -up src/bin/sage.orig src/bin/sage # Report information about the Sage environment ##################################################################### -@@ -424,35 +233,8 @@ if [ $# -gt 0 ]; then +@@ -425,35 +233,8 @@ if [ $# -gt 0 ]; then fi @@ -318,7 +319,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 -@@ -463,20 +245,6 @@ sage_setup() { +@@ -464,20 +245,6 @@ sage_setup() { } @@ -339,7 +340,7 @@ diff -up src/bin/sage.orig src/bin/sage # Start an interactive Sage session, this function never returns. interactive_sage() { sage_setup -@@ -560,16 +328,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ] +@@ -561,16 +328,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ] exec ecl "$@" fi @@ -356,8 +357,8 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then shift exec maxima "$@" -@@ -595,11 +353,6 @@ if [ "$1" = '-pip' -o "$1" = '--pip' ]; - exec sage-python23 -m pip "$@" +@@ -601,11 +358,6 @@ if [ "$1" = '--pip3' ]; then + exec python3 -m pip "$@" fi -if [ "$1" = '-fix-pkg-checksums' -o "$1" = '--fix-pkg-checksums' ]; then @@ -368,7 +369,7 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = '-python' -o "$1" = '--python' ]; then shift if [ "$SAGE_PYTHON3" = 'yes' ]; then -@@ -639,16 +392,6 @@ if [ "$1" = '-jupyter' -o "$1" = '--jupy +@@ -645,16 +397,6 @@ if [ "$1" = '-jupyter' -o "$1" = '--jupy exec jupyter "$@" fi @@ -385,7 +386,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 -@@ -768,20 +511,6 @@ EOF +@@ -774,20 +516,6 @@ EOF fi ##################################################################### @@ -406,7 +407,7 @@ diff -up src/bin/sage.orig src/bin/sage # File conversion ##################################################################### -@@ -812,11 +541,6 @@ fi +@@ -818,11 +546,6 @@ fi # Run Sage's versions of the standard Algebra/Geometry etc. software ##################################################################### @@ -418,7 +419,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 "$@" -@@ -827,13 +551,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not +@@ -833,13 +556,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not exec sage-notebook "$@" fi @@ -432,7 +433,7 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then shift sage-cleaner &>/dev/null & -@@ -852,34 +569,15 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep +@@ -858,34 +574,15 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep exit 0 fi @@ -469,7 +470,7 @@ diff -up src/bin/sage.orig src/bin/sage shift exec sage-runtests -p "$@" else -@@ -888,10 +586,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" +@@ -894,10 +591,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" fi fi @@ -481,7 +482,7 @@ diff -up src/bin/sage.orig src/bin/sage shift sage_setup export PYTHONIOENCODING="utf-8" # Fix encoding for doctests -@@ -912,122 +607,6 @@ if [ "$1" = '-c' ]; then +@@ -918,122 +612,6 @@ if [ "$1" = '-c' ]; then exec sage-eval "$@" fi @@ -604,7 +605,7 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then shift sage_setup -@@ -1077,12 +656,6 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca +@@ -1083,12 +661,6 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca exec sage-callgrind "$@" fi @@ -618,9 +619,9 @@ diff -up src/bin/sage.orig src/bin/sage exec sage-startuptime.py "$@" fi diff -up src/bin/sage-runtests.orig src/bin/sage-runtests ---- src/bin/sage-runtests.orig 2019-03-23 16:20:31.000000000 -0600 -+++ src/bin/sage-runtests 2019-04-08 11:40:35.881987545 -0600 -@@ -79,10 +79,6 @@ if __name__ == "__main__": +--- src/bin/sage-runtests.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/bin/sage-runtests 2019-06-27 11:22:47.435227309 -0600 +@@ -95,10 +95,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(DOT_SAGE, "valgrind")) @@ -632,8 +633,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 2019-03-23 16:20:31.000000000 -0600 -+++ src/bin/sage-valgrind 2019-04-08 11:40:35.881987545 -0600 +--- src/bin/sage-valgrind.orig 2019-06-26 14:41:04.000000000 -0600 ++++ src/bin/sage-valgrind 2019-06-27 11:22:47.435227309 -0600 @@ -1,16 +1,6 @@ #!/usr/bin/env bash diff --git a/sagemath.spec b/sagemath.spec index f779bbc..c458db1 100644 --- a/sagemath.spec +++ b/sagemath.spec @@ -40,15 +40,18 @@ %global combinatorial_designs_pkg combinatorial_designs-20140630 %global conway_polynomials_pkg conway_polynomials-0.5 -%global elliptic_curves_pkg elliptic_curves-0.8 +%global elliptic_curves_pkg elliptic_curves-0.8.1 %global flintqs_pkg flintqs-1.0 %global graphs_pkg graphs-20161026 %if %{with bundled_ipython} -%global ipython_pkg ipython-5.8.0 -%global prompt_tookit_pkg prompt_toolkit-1.0.15 +%global ipython_ver 5.8.0 +%global ipython_pkg ipython-%{ipython_ver} +%global prompt_toolkit_ver 1.0.15 +%global prompt_tookit_pkg prompt_toolkit-%{prompt_toolkit_ver} %endif %if %{with bundled_ipywidgets} -%global ipywidgets_pkg ipywidgets-7.4.2 +%global ipywidgets_ver 7.4.2 +%global ipywidgets_pkg ipywidgets-%{ipywidgets_ver} %endif %if %{with bundled_pexpect} %global pexpect_pkg pexpect-4.6.0 @@ -58,16 +61,19 @@ %global sagenb_pkg sagenb-1.1.2 %global sagenb_export_pkg sagenb_export-3.2 %global sagetex_pkg sagetex-3.2 -%global Sphinx_pkg Sphinx-1.7.6 +%global Sphinx_pkg Sphinx-1.8.5 %global singular_pkg singular-4.1.1p3 %if %{with bundled_thebe} -%global thebe_pkg thebe-9624e0a0 +%global thebe_ver 9624e0a0 +%global thebe_pkg thebe-%{thebe_ver} %endif %if %{with bundled_threejs} -%global threejs_pkg threejs-r80 +%global threejs_ver r100 +%global threejs_pkg threejs-%{threejs_ver} %endif %if %{with bundled_widgetsnbextension} -%global widgetsnbextension_pkg widgetsnbextension-3.4.2 +%global widgetsnbextension_ver 3.4.2 +%global widgetsnbextension_pkg widgetsnbextension-%{widgetsnbextension_ver} %endif # Spkg equivalents of required rpms; we pretend they are installed as spkgs. @@ -86,7 +92,7 @@ Name: sagemath Summary: A free open-source mathematics software system -Version: 8.7 +Version: 8.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 @@ -108,7 +114,6 @@ Patch1: %{name}-random.patch Patch2: %{name}-scripts.patch # remove call to not implemented sagemath "is_package_installed" interfaces -# need to package coin-or solver in fedora # remove check for non free solvers Patch3: %{name}-extensions.patch @@ -148,8 +153,6 @@ Patch11: %{name}-cremona.patch Patch12: %{name}-python3.patch # correct path to the nauty geng program -# http://cs.anu.edu.au/~bdm/nauty/ -# http://pallini.di.uniroma1.it/ Patch13: %{name}-nauty.patch # remove the buildroot path from Cython output @@ -204,6 +207,9 @@ Patch29: %{name}-rubiks.patch # Fix an indentation error in sagetex Patch30: %{name}-sagetex.patch +# Fix some path settings in the sage environment +Patch31: %{name}-env.patch + BuildRequires: 4ti2 BuildRequires: arb-devel BuildRequires: boost-devel @@ -228,10 +234,14 @@ BuildRequires: gap-pkg-crime BuildRequires: gap-pkg-design BuildRequires: gap-pkg-guava BuildRequires: gap-pkg-hapcryst +BuildRequires: gap-pkg-happrime BuildRequires: gap-pkg-sonata BuildRequires: gap-pkg-toric BuildRequires: gc-devel BuildRequires: gcc-c++ +BuildRequires: gcc-gfortran +BuildRequires: gcc-objc +BuildRequires: gcc-objc++ BuildRequires: gd-devel BuildRequires: gdb BuildRequires: gfan @@ -272,6 +282,7 @@ BuildRequires: pari-devel BuildRequires: pari-galdata BuildRequires: pari-gp BuildRequires: pari-seadata +BuildRequires: perl-generators BuildRequires: planarity-devel BuildRequires: ppl-devel BuildRequires: pynac-devel @@ -281,9 +292,6 @@ BuildRequires: python3-cysignals-devel BuildRequires: python3-pillow-devel BuildRequires: python3-pplpy-devel BuildRequires: python3dist(brial) -%if %{with sphinx_hack} -BuildRequires: python3dist(configparser) -%endif BuildRequires: python3dist(cvxopt) BuildRequires: python3dist(cython) BuildRequires: python3dist(docutils) @@ -320,7 +328,7 @@ BuildRequires: python3dist(psutil) BuildRequires: python3dist(ptyprocess) BuildRequires: python3dist(pycryptosat) %if %{with bundled_ipython} -BuildRequires: python3dist(pyzmq) +BuildRequires: python3dist(pyzmq) %endif BuildRequires: python3dist(rpy2) BuildRequires: python3dist(scipy) @@ -368,6 +376,7 @@ Requires: gap-pkg-crime Requires: gap-pkg-design Requires: gap-pkg-guava Requires: gap-pkg-hapcryst +Requires: gap-pkg-happrime Requires: gap-pkg-sonata Requires: gap-pkg-toric Requires: gfan @@ -387,9 +396,6 @@ Requires: pari-galdata Requires: pari-gp Requires: pari-seadata Requires: python3dist(brial) -%if %{with sphinx_hack} -Requires: python3dist(configparser) -%endif Requires: python3dist(cypari2) Requires: python3dist(cysignals) Requires: python3dist(cvxopt) @@ -460,10 +466,10 @@ Requires: texlive Requires: vecmath %if %{with bundled_thebe} -Provides: bundled(thebe) = %(cut -d- -f2- <<< %{thebe_pkg}) +Provides: bundled(thebe) = %{thebe_ver} %endif %if %{with bundled_threejs} -Provides: bundled(threejs) = %(cut -d- -f2- <<< %{threejs_pkg}) +Provides: bundled(threejs) = %{threejs_ver} %endif %description @@ -476,14 +482,14 @@ packages into a common Python-based interface. Summary: Open Source Mathematics Software Requires: %{name}%{?_isa} = %{version}-%{release} %if %{with bundled_ipython} -Provides: bundled(ipython) = %(cut -d- -f2- <<< %{ipython_pkg}) -Provides: bundled(prompt_toolkit) = %(cut -d- -f2- <<< %{prompt_tookit_pkg}) +Provides: bundled(ipython) = %{ipython_ver} +Provides: bundled(prompt_toolkit) = %{prompt_toolkit_ver} %endif %if %{with bundled_ipywidgets} -Provides: bundled(ipywidgets) = %(cut -d- -f2- <<< %{ipywidgets_pkg}) +Provides: bundled(ipywidgets) = %{ipywidgets_ver} %endif %if %{with bundled_widgetsnbextension} -Provides: bundled(widgetsnbextension) = %(cut -d- -f2- <<< %{widgetsnbextension_pkg}) +Provides: bundled(widgetsnbextension) = %{widgetsnbextension_ver} %endif %description core @@ -772,7 +778,7 @@ pushd build/pkgs/pexpect tar zxf ../../../upstream/%{pexpect_pkg}.tar.gz mv %{pexpect_pkg} src pushd src - for diff in `ls ../patches/*.patch`; do + for diff in ../patches/*.patch; do patch -p1 < $diff done popd @@ -788,7 +794,7 @@ pushd build/pkgs/rubiks tar jxf ../../../upstream/%{rubiks_pkg}.tar.bz2 mv %{rubiks_pkg} src pushd src - for diff in `ls ../patches/*.patch`; do + for diff in ../patches/*.patch; do patch -p1 < $diff done popd @@ -808,7 +814,7 @@ pushd build/pkgs/sagetex tar zxf ../../../upstream/%{sagetex_pkg}.tar.gz mv %{sagetex_pkg} src # Fix the style file install path - texmfdir=$(cut -d/ -f3- <<< "%{_texmf_main}") + texmfdir=$(cut -d/ -f3- <<< "%{_texmf}") sed -i "s,share/texmf,$texmfdir," src/setup.py popd @@ -818,7 +824,7 @@ pushd build/pkgs/sphinx tar zxf ../../../upstream/%{Sphinx_pkg}.tar.gz mv %{Sphinx_pkg} src pushd src - for diff in `ls ../patches/*.patch`; do + for diff in ../patches/*.patch; do patch -p1 < $diff done popd @@ -884,9 +890,11 @@ popd %patch28 %patch29 %patch30 +%patch31 sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \ -e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \ + -e 's|@@SAGE_LOCAL@@|%{SAGE_LOCAL}|' \ -i src/sage/env.py sed -e 's|@@CYSIGNALS@@|%{python3_sitearch}/cysignals|' \ @@ -898,7 +906,7 @@ sed -e "/flask-oldsessions/d" \ #------------------------------------------------------------------------ # some .c files are not (re)generated -find src/sage \( -name \*.pyx -o -name \*.pxd \) | xargs touch +find src/sage \( -name \*.pyx -o -name \*.pxd \) -exec touch {} \+ # remove bundled jar files before build rm build/pkgs/sagenb/src/sagenb/data/sage3d/lib/sage3d.jar @@ -915,11 +923,15 @@ sed -e "s,\(SINGULAR_SO = \)SAGE.*,\1'%{_libdir}/libSingular-$singver.so'," \ -i src/sage/env.py # fix shebangs; some paths contains spaces, so use the null byte facility +grep -FrlZ '#!%{_bindir}/env python3' | \ + xargs -0 sed -i 's,#!%{_bindir}/env python3,#!%{__python3},g' grep -FrlZ '#!%{_bindir}/env python' | \ - xargs -0 sed -i 's,#!%{_bindir}/env python,#!%{__python3},' + xargs -0 sed -i 's,#!%{_bindir}/env python,#!%{__python3},g' +grep -FrlZ '#!%{_bindir}/env sage-system-python' | \ + xargs -0 sed -i 's,#!%{_bindir}/env sage-system-python,#!%{__python3},g' grep -FrlZ '#!%{_bindir}/env sage-python23' | \ - xargs -0 sed -i 's,#!%{_bindir}/env sage-python23,#!%{__python3},' -grep -FrlZ 'sage-python23' | xargs -0 sed -i 's,sage-python23,#!%{__python3},' + xargs -0 sed -i 's,#!%{_bindir}/env sage-python23,#!%{__python3},g' +grep -FrlZ 'sage-python23' | xargs -0 sed -i 's,sage-python23,python3,g' grep -FrlZ '#!%{_bindir}/env' | \ xargs -0 sed -i 's,#!%{_bindir}/env ,#!%{_bindir}/,' grep -rlZ '#!%{_bindir}/python$' | xargs -0 sed -i 's,#!%{_bindir}/python$,&3,' @@ -938,7 +950,7 @@ sed -e "s|'%{_bindir}/env', 'which'|'%{_bindir}/which'|" \ %endif # GAP does not have enough memory to load the entire workspace -sed -i 's/64m/128m/' src/sage/libs/gap/util.pyx +sed -i 's/64m/128m/' src/sage/interfaces/gap.py ######################################################################## @@ -947,6 +959,7 @@ export CC=%{__cc} export CFLAGS="%{optflags}" export CXXFLAGS="%{optflags}" export SAGE_PYTHON_VERSION=3 +export SAGE_PYTHON3=yes export SAGE_ROOT=%{buildroot}%{SAGE_ROOT} export SAGE_LOCAL=%{buildroot}%{SAGE_LOCAL} # Avoid buildroot in gcc command line (use _builddir instead) @@ -974,6 +987,22 @@ export PYTHON=%{_bindir}/python3 export PYTHONPATH=%{buildroot}%{python3_sitearch}:$PYTHONPATH #------------------------------------------------------------------------ +# Generate sage-env-config +sed -e 's,@prefix@,%{SAGE_LOCAL},' \ + -e 's,@CC@,gcc,' \ + -e 's,@CXX@,g++,' \ + -e 's,@FC@,gfortran,' \ + -e 's,@OBJC@,gcc,' \ + -e 's,@OBJCXX@,g++,' \ + -e 's,@SAGE_PYTHON_VERSION@,3,' \ + -e 's,@SAGE_GMP_PREFIX@,,' \ + -e 's,@SAGE_GMP_INCLUDE@,%{_includedir},' \ + -e 's,@SAGE_MPFR_PREFIX@,,' \ + -e 's,@SAGE_MPC_PREFIX@,,' \ + -e 's,@SAGE_NTL_PREFIX@,,' \ + src/bin/sage-env-config.in > src/bin/sage-env-config + +#------------------------------------------------------------------------ # Save and update environment to generate bundled interfaces save_PATH=$PATH save_LOCAL=$SAGE_LOCAL @@ -1036,6 +1065,10 @@ pushd build/pkgs/sagenb_export/src %__python3 ./setup.py build popd +pushd build/pkgs/sagetex/src + %__python3 ./setup.py build +popd + #------------------------------------------------------------------------ pushd build/pkgs/flintqs/src %configure @@ -1088,7 +1121,7 @@ ln -sf %{_datadir} $SAGE_LOCAL/share #------------------------------------------------------------------------ pushd src/ext mkdir -p $SAGE_ETC - for dir in \ + for dir in \ gap \ graphs \ images \ @@ -1159,6 +1192,7 @@ pushd src/bin ln -sf %{_bindir}/gp sage_pari ln -sf %{_bindir}/gap gap ln -sf %{_bindir}/gmp-ecm ecm + rm -f sage-env-config.in popd popd install -p -m755 src/bin/sage $SAGE_LOCAL/bin @@ -1260,7 +1294,7 @@ popd #------------------------------------------------------------------------ pushd build/pkgs/sagetex/src %py3_install "--install-purelib=%{python3_sitearch}" - mv %{buildroot}%{_texmf_main}/tex/latex/sagetex/CONTRIBUTORS \ + mv %{buildroot}%{_texmf}/tex/latex/sagetex/CONTRIBUTORS \ %{buildroot}%{_docdir}/sagetex for file in PKG-INFO README; do install -p -m 0644 $file %{buildroot}%{_docdir}/sagetex/$file @@ -1316,6 +1350,7 @@ export SAGE_SHARE="$SAGE_SHARE" export SAGE_EXTCODE="$SAGE_ETC" export SAGE_ETC="$SAGE_ETC" export SAGE_SRC="%{buildroot}%{SAGE_SRC}" +export SAGE_PYTHON3=yes ##export SAGE_DOC="$SAGE_DOC" ##export SAGE_DOC_SRC="\$SAGE_DOC" ##export SAGE_PKGS="\$SAGE_LOCAL/var/lib/sage/installed" @@ -1330,11 +1365,10 @@ export SINGULAR_SO=%{_libdir}/libSingular-4.1.1.so export SAGE_FORTRAN=%{_bindir}/gfortran export SAGE_FORTRAN_LIB=\`gfortran --print-file-name=libgfortran.so\` export SYMPOW_DIR="\$DOT_SAGE/sympow" -export LD_LIBRARY_PATH=\$SAGE_ROOT/lib:\$LD_LIBRARY_PATH # Required for sage -gdb : \${SAGE_DEBUG:=no} export SAGE_DEBUG -$SAGE_LOCAL/bin/sage "\$@" +exec $SAGE_LOCAL/bin/sage "\$@" EOF #------------------------------------------------------------------------ chmod +x %{buildroot}%{_bindir}/sage @@ -1379,9 +1413,9 @@ pushd src/doc %if %{with sphinx_hack} pushd ../../build/pkgs/sphinx/src - %py3_build - %py3_install "--install-purelib=%{python3_sitearch}" - rm -f %{buildroot}%{_bindir}/sphinx* + %py3_build + %py3_install "--install-purelib=%{python3_sitearch}" + rm -f %{buildroot}%{_bindir}/sphinx* popd %endif @@ -1461,7 +1495,7 @@ EOF desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop # Fix permissions -find %{buildroot} -name '*.so' | xargs chmod 755 +find %{buildroot} -name '*.so' -exec chmod 755 {} \+ pushd %{buildroot}%{SAGE_LOCAL}/bin chmod 755 QuadraticSieve chmod 755 mcube dikcube cu2 size222 cubex optimal @@ -1476,7 +1510,7 @@ done chmod -x %{buildroot}%{SAGE_DOC}/en/prep/media/Rplot001.png # Documentation is not rebuilt (also corrects rpmlint warning of hidden file) -find %{buildroot}%{SAGE_DOC} -name .buildinfo -exec rm {} \+ +find %{buildroot}%{SAGE_DOC} -name .buildinfo -delete rm -fr %{buildroot}%{SAGE_DOC}/output/inventory find %{buildroot}%{SAGE_DOC} -type d -name _sources -exec rm -fr {} \+ %endif @@ -1507,7 +1541,7 @@ done popd pushd %{buildroot}%{SAGE_SPKG_INST} for pkg in %{SAGE_REQUIRED_PKGS}; do - mkdir $pkg + mkdir $pkg done popd #------------------------------------------------------------------------ @@ -1519,7 +1553,7 @@ while [ \$# -gt 0 ]; do if [ x\$1 = x--no-version ]; then NOVERSION=true elif [ x\$1 = xinstalled ]; then - INSTALLED=yes + INSTALLED=yes fi shift done @@ -1547,7 +1581,7 @@ chmod +x %{buildroot}%{SAGE_LOCAL}/bin/sage-list-packages #------------------------------------------------------------------------ # Byte compile python files in nonstandard places -%py_byte_compile %{__python3} %{buildroot}%{_texmf_main}/tex/latex/sagetex +%py_byte_compile %{__python3} %{buildroot}%{_texmf}/tex/latex/sagetex #------------------------------------------------------------------------ # Jupyter integration @@ -1829,11 +1863,19 @@ rm -fr $DOT_SAGE %files sagetex # GPLv2+ %{python3_sitearch}/sagetex* -%{_texmf_main}/tex/latex/sagetex +%{python3_sitearch}/__pycache__/sagetex* +%{_texmf}/tex/latex/sagetex %doc %{_docdir}/sagetex ######################################################################## %changelog +* Mon Jul 1 2019 Jerry James - 8.8-1 +- Update to sagemath 8.8 (bz 1724394) +- Remove configparser dependencies (bz 1706597) +- Fix broken sed conversion (bz 1706234) +- Fix python2 versus python3 snafu (bz 1706337, 1707166) +- Build and install sagetex (bz 1706322) + * Sat Apr 27 2019 Jerry James - 8.7-1 - Update to sagemath 8.7 - Drop upstreamed -giac patch diff --git a/sources b/sources index 3e15ebc..c8f0d25 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sage-8.7.tar.gz) = 6d89ad388d667c67970f4378fe1208115436d70e913d53e81241766996677b827cd5e97348325d1dc069e5de03b755a25c02c7487c6dc2a15103ffbf25c00a1d +SHA512 (sage-8.8.tar.gz) = bac6cdd07e1c1bb36cf8617bc5b580818048702f9f73ba1d034e0ae100bbdb7f2ef3f2133d7cea739c98f103ca9e3b90a7c29d87314fb398b9d7984f194d0357