Update to sagemath 7.4

This commit is contained in:
pcpa 2016-12-30 10:04:34 -05:00
parent 6b381937c4
commit 807c53b3b6
21 changed files with 299 additions and 2458 deletions

1
.gitignore vendored
View file

@ -10,3 +10,4 @@
/sage-6.5.tar.gz
/sage-6.8.tar.gz
/sage-7.3.tar.gz
/sage-7.4.tar.gz

View file

@ -1,6 +1,6 @@
diff -up src/sage/sandpiles/sandpile.py.orig src/sage/sandpiles/sandpile.py
--- src/sage/sandpiles/sandpile.py.orig 2016-08-08 13:33:09.209528750 -0400
+++ src/sage/sandpiles/sandpile.py 2016-08-08 13:33:36.251529786 -0400
--- 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
@@ -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.
@@ -5229,7 +5226,7 @@ class SandpileDivisor(dict):
@@ -5203,7 +5200,7 @@ class SandpileDivisor(dict):
sign_file.close()
# compute
try:

View file

@ -1,7 +1,7 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2016-08-11 09:33:26.357108127 -0400
+++ src/module_list.py 2016-08-11 09:34:15.543110010 -0400
@@ -12,26 +12,20 @@ SAGE_INC = '/usr/include'
--- 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
@@ -12,20 +12,14 @@ SAGE_INC = '/usr/include'
import pkgconfig
# CBLAS can be one of multiple implementations
@ -24,7 +24,9 @@ diff -up src/module_list.py.orig src/module_list.py
+lapack_library_dirs = []
+lapack_include_dirs = [ SAGE_INC + '/lapack' ]
# GNU Scientific Library
# 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
gsl_pc = pkgconfig.parse('gsl')
gsl_libs = list(gsl_pc['libraries'].difference(['gslcblas']).union(cblas_libs))
@ -34,9 +36,9 @@ diff -up src/module_list.py.orig src/module_list.py
# GD image library
diff -up src/sage/misc/cython.py.orig src/sage/misc/cython.py
--- src/sage/misc/cython.py.orig 2016-08-11 09:33:26.362108127 -0400
+++ src/sage/misc/cython.py 2016-08-11 09:33:29.353108241 -0400
@@ -27,15 +27,11 @@ import pkgconfig
--- 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
@@ -30,15 +30,11 @@ import pkgconfig
# CBLAS can be one of multiple implementations

View file

@ -1,7 +1,7 @@
diff -up src/sage/numerical/backends/coin_backend.pyx.orig src/sage/numerical/backends/coin_backend.pyx
--- src/sage/numerical/backends/coin_backend.pyx.orig 2016-08-08 13:41:10.063547164 -0400
+++ src/sage/numerical/backends/coin_backend.pyx 2016-08-08 13:41:28.426547867 -0400
@@ -755,8 +755,8 @@ cdef class CoinBackend(GenericBackend):
--- src/sage/numerical/backends/coin_backend.pyx.orig 2016-10-20 08:11:54.641546892 -0400
+++ src/sage/numerical/backends/coin_backend.pyx 2016-10-20 08:12:03.505547232 -0400
@@ -756,8 +756,8 @@ cdef class CoinBackend(GenericBackend):
model.setLogLevel(old_logLevel)
# multithreading

View file

@ -1,6 +1,6 @@
diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py
--- src/sage/databases/cremona.py.orig 2016-08-08 13:36:38.575536768 -0400
+++ src/sage/databases/cremona.py 2016-08-08 13:37:49.994539502 -0400
--- src/sage/databases/cremona.py.orig 2016-10-20 08:11:03.521544935 -0400
+++ src/sage/databases/cremona.py 2016-10-20 08:11:13.681545324 -0400
@@ -53,7 +53,6 @@ from sage.misc.prandom import randint
import sage.schemes.elliptic_curves.constructor as elliptic
@ -9,7 +9,7 @@ diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py
from sage.env import SAGE_SHARE
from sage.misc.all import walltime
@@ -828,14 +827,6 @@ class MiniCremonaDatabase(SQLDatabase):
@@ -824,14 +823,6 @@ class MiniCremonaDatabase(SQLDatabase):
if N < self.largest_conductor():
message = "There is no elliptic curve with label " + label \
+ " in the database"
@ -24,7 +24,7 @@ diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py
raise ValueError(message)
ainvs = eval(c[0])
data = {'cremona_label': label,
@@ -1677,10 +1668,12 @@ def CremonaDatabase(name=None,mini=None,
@@ -1673,10 +1664,12 @@ def CremonaDatabase(name=None,mini=None,
if name is None and not set_global:
return _db
if set_global and name is None:

View file

@ -1,7 +1,7 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2016-08-08 13:14:09.383485102 -0400
+++ src/module_list.py 2016-08-08 13:17:44.834493353 -0400
@@ -147,7 +147,6 @@ library_order["stdc++"] = 1000
--- 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
###
#############################################################
@ -9,7 +9,7 @@ diff -up src/module_list.py.orig src/module_list.py
UNAME = os.uname()
def uname_specific(name, value, alternative):
@@ -378,21 +377,21 @@ ext_modules = [
@@ -398,21 +397,21 @@ ext_modules = [
libraries = ['flint'],
extra_compile_args = ['-std=c99']),
@ -46,7 +46,7 @@ diff -up src/module_list.py.orig src/module_list.py
Extension('sage.graphs.planarity',
sources = ['sage/graphs/planarity.pyx'],
@@ -411,10 +410,10 @@ ext_modules = [
@@ -431,10 +430,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']),
@@ -553,18 +552,18 @@ ext_modules = [
@@ -573,18 +572,18 @@ ext_modules = [
##
################################
@ -87,7 +87,7 @@ diff -up src/module_list.py.orig src/module_list.py
["sage/libs/fes.pyx"],
language = "c",
libraries = ['fes'],
@@ -597,17 +596,17 @@ ext_modules = [
@@ -614,17 +613,17 @@ ext_modules = [
Extension('sage.libs.gmp.rational_reconstruction',
sources = ['sage/libs/gmp/rational_reconstruction.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'],
@@ -989,10 +988,10 @@ ext_modules = [
# Extension('sage.libs.linbox.linbox',
# sources = ['sage/libs/linbox/linbox.pyx']),
@@ -997,10 +996,10 @@ ext_modules = [
Extension('sage.matrix.matrix_window',
sources = ['sage/matrix/matrix_window.pyx']),
@ -129,7 +129,7 @@ diff -up src/module_list.py.orig src/module_list.py
Extension('sage.matrix.misc',
sources = ['sage/matrix/misc.pyx'],
@@ -1025,12 +1024,6 @@ ext_modules = [
@@ -1033,12 +1032,6 @@ ext_modules = [
Extension('*', ['sage/misc/*.pyx']),
@ -142,7 +142,7 @@ diff -up src/module_list.py.orig src/module_list.py
################################
##
## sage.modular
@@ -1173,19 +1166,19 @@ ext_modules = [
@@ -1190,19 +1183,19 @@ ext_modules = [
Extension("sage.numerical.backends.interactivelp_backend",
["sage/numerical/backends/interactivelp_backend.pyx"]),
@ -174,7 +174,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",
@@ -1677,7 +1670,7 @@ ext_modules = [
@@ -1681,7 +1674,7 @@ ext_modules = [
##
################################
@ -183,7 +183,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++",
@@ -1685,7 +1678,7 @@ ext_modules = [
@@ -1689,7 +1682,7 @@ ext_modules = [
library_dirs = zlib_library_dirs,
package = 'cryptominisat'),

View file

@ -1,7 +1,7 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2016-08-08 13:44:56.193555823 -0400
+++ src/module_list.py 2016-08-08 13:45:10.146556357 -0400
@@ -563,11 +563,11 @@ ext_modules = [
--- 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 = [
sources = ["sage/libs/ecl.pyx"],
libraries = ["ecl"]),

View file

@ -1,7 +1,7 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2016-12-20 18:33:57.413138357 -0200
+++ src/module_list.py 2016-12-20 18:34:00.857036531 -0200
@@ -24,7 +24,7 @@ lapack_include_dirs = [ SAGE_INC + '/lap
--- 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')
@ -10,28 +10,10 @@ diff -up src/module_list.py.orig src/module_list.py
gsl_library_dirs = list(cblas_pc['library_dirs'])
gsl_include_dirs = list(gsl_pc['include_dirs'])
diff -up src/sage/structure/element_wrapper.pyx.orig src/sage/structure/element_wrapper.pyx
--- src/sage/structure/element_wrapper.pyx.orig 2016-12-20 18:33:57.416138269 -0200
+++ src/sage/structure/element_wrapper.pyx 2016-12-20 18:34:20.210464296 -0200
@@ -111,10 +111,10 @@ cdef class ElementWrapper(Element):
Element.__init__(self, parent=parent)
self.value = value
- # When self is an extension type without a __dict__ attribute,
- # this prevents self.__dict__ to return whatever crap obtained by
- # lookup through the categories ...
- __dict__ = {}
+ # When self is an extension type without a __dict__ attribute,
+ # this prevents self.__dict__ to return whatever crap obtained by
+ # lookup through the categories ...
+ __dict__ = {}
def __getstate__(self):
"""
diff -up src/setup.py.orig src/setup.py
--- src/setup.py.orig 2016-12-20 18:33:57.414138328 -0200
+++ src/setup.py 2016-12-20 18:34:00.858036501 -0200
@@ -542,9 +542,9 @@ def run_cythonize():
--- 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

View file

@ -1,7 +1,7 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2016-08-10 09:10:17.614742069 -0400
+++ src/module_list.py 2016-08-10 09:11:22.887744568 -0400
@@ -954,7 +954,7 @@ ext_modules = [
--- 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 = [
library_dirs = m4ri_library_dirs,
include_dirs = m4ri_include_dirs,
depends = [SAGE_INC + "/m4rie/m4rie.h"],
@ -10,21 +10,3 @@ diff -up src/module_list.py.orig src/module_list.py
Extension('sage.matrix.matrix_modn_dense_float',
sources = ['sage/matrix/matrix_modn_dense_float.pyx'],
@@ -962,7 +962,7 @@ ext_modules = [
libraries = ['ntl', 'linbox', 'givaro', 'mpfr', 'gmpxx', 'gmp'] + cblas_libs,
library_dirs = cblas_library_dirs,
include_dirs = cblas_include_dirs,
- extra_compile_args = nocxx11_args + ['-DDISABLE_COMMENTATOR'] + givaro_extra_compile_args),
+ extra_compile_args = ['-std=c++11', '-D__GIVARO_modular_uint64_H', '-D__GIVARO_modular_int64_H'] + ['-DDISABLE_COMMENTATOR'] + givaro_extra_compile_args),
Extension('sage.matrix.matrix_modn_dense_double',
sources = ['sage/matrix/matrix_modn_dense_double.pyx'],
@@ -970,7 +970,7 @@ ext_modules = [
libraries = ['ntl', 'linbox', 'givaro', 'mpfr', 'gmpxx', 'gmp'] + cblas_libs,
library_dirs = cblas_library_dirs,
include_dirs = cblas_include_dirs,
- extra_compile_args = nocxx11_args + ["-D_XPG6", "-DDISABLE_COMMENTATOR"]
+ extra_compile_args = ['-std=c++11', '-D__GIVARO_modular_uint64_H', '-D__GIVARO_modular_int64_H'] + ["-D_XPG6", "-DDISABLE_COMMENTATOR"]
+ m4ri_extra_compile_args + givaro_extra_compile_args),
Extension('sage.matrix.matrix_modn_sparse',

View file

@ -1,73 +1,6 @@
Some functions were moved from linbox to givaro, and some header files were
renamed in linbox 1.4 and givaro 4.
diff -up src/sage/libs/linbox/echelonform.pxd.orig src/sage/libs/linbox/echelonform.pxd
--- src/sage/libs/linbox/echelonform.pxd.orig 2015-07-26 07:34:43.000000000 -0600
+++ src/sage/libs/linbox/echelonform.pxd 2016-02-27 10:08:25.665593617 -0700
@@ -1,23 +1,23 @@
from sage.libs.linbox.modular cimport ModDoubleField, ModDoubleFieldElement, ModFloatField, ModFloatFieldElement
from libc.stdint cimport uint64_t
-cdef extern from "linbox/matrix/blas-matrix.h" namespace "LinBox":
- cdef cppclass BlasMatrixDouble "LinBox::BlasMatrix<LinBox::Modular<double> >":
+cdef extern from "linbox/matrix/densematrix/blas-matrix.h" namespace "LinBox":
+ cdef cppclass BlasMatrixDouble "LinBox::BlasMatrix<Givaro::Modular<double> >":
BlasMatrixDouble(ModDoubleField F, uint64_t nrows, uint64_t ncols)
void setEntry(size_t i, size_t j, ModDoubleFieldElement t)
ModDoubleFieldElement &getEntry(size_t i, size_t j)
- cdef cppclass BlasMatrixFloat "LinBox::BlasMatrix<LinBox::Modular<float> >":
+ cdef cppclass BlasMatrixFloat "LinBox::BlasMatrix<Givaro::Modular<float> >":
BlasMatrixFloat(ModFloatField F, uint64_t nrows, uint64_t ncols)
void setEntry(size_t i, size_t j, ModFloatFieldElement t)
ModFloatFieldElement &getEntry(size_t i, size_t j)
cdef extern from "linbox/algorithms/echelon-form.h":
- cdef cppclass EchelonFormDomainDouble "LinBox::EchelonFormDomain<LinBox::Modular<double> >":
+ cdef cppclass EchelonFormDomainDouble "LinBox::EchelonFormDomain<Givaro::Modular<double> >":
EchelonFormDomainDouble(ModDoubleField)
int rowReducedEchelon(BlasMatrixDouble, BlasMatrixDouble)
- cdef cppclass EchelonFormDomainFloat "LinBox::EchelonFormDomain<LinBox::Modular<float> >":
+ cdef cppclass EchelonFormDomainFloat "LinBox::EchelonFormDomain<Givaro::Modular<float> >":
EchelonFormDomainFloat(ModFloatField)
int rowReducedEchelon(BlasMatrixFloat, BlasMatrixFloat)
diff -up src/sage/libs/linbox/modular.pxd.orig src/sage/libs/linbox/modular.pxd
--- src/sage/libs/linbox/modular.pxd.orig 2015-07-26 07:34:43.000000000 -0600
+++ src/sage/libs/linbox/modular.pxd 2016-02-26 20:00:09.329004419 -0700
@@ -1,10 +1,10 @@
-cdef extern from "linbox/field/modular.h":
+cdef extern from "givaro/modular-double.h":
# double
- cdef cppclass ModDoubleFieldElement "LinBox::Modular<double>::Element":
+ cdef cppclass ModDoubleFieldElement "Givaro::Modular<double>::Element":
pass
- cdef cppclass ModDoubleField "LinBox::Modular<double>":
+ cdef cppclass ModDoubleField "Givaro::Modular<double>":
ModDoubleField(int modulus)
ModDoubleFieldElement init(ModDoubleFieldElement res, int v)
ModDoubleFieldElement init(ModDoubleFieldElement res, double v)
@@ -19,11 +19,12 @@ cdef extern from "linbox/field/modular.h
bint isZero(ModDoubleFieldElement x)
+cdef extern from "givaro/modular-float.h":
# float
- cdef cppclass ModFloatFieldElement "LinBox::Modular<float>::Element":
+ cdef cppclass ModFloatFieldElement "Givaro::Modular<float>::Element":
pass
- cdef cppclass ModFloatField "LinBox::Modular<float>":
+ cdef cppclass ModFloatField "Givaro::Modular<float>":
ModFloatField(int modulus)
ModFloatFieldElement init(ModFloatFieldElement res, int v)
ModFloatFieldElement init(ModFloatFieldElement res, double v)
diff -up src/sage/libs/singular/singular.pyx.orig src/sage/libs/singular/singular.pyx
--- src/sage/libs/singular/singular.pyx.orig 2015-07-26 07:34:43.000000000 -0600
+++ src/sage/libs/singular/singular.pyx 2016-03-07 06:11:58.246631802 -0700
--- 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":
long INT_MAX
long INT_MIN
@ -76,34 +9,4 @@ diff -up src/sage/libs/singular/singular.pyx.orig src/sage/libs/singular/singula
+
import os
from sage.libs.singular.decl cimport intvec
@@ -157,7 +159,7 @@ cdef FFgivE si2sa_GFqGivaro(number *n, r
order = cache.objectptr.cardinality() - 1
while z:
- c = cache.objectptr.initi(c, <long>napGetCoeff(z))
+ c = cache.objectptr.initi(c, <int64_t>napGetCoeff(z))
e = napGetExpFrom(z,1, _ring)
if e == 0:
ret = cache.objectptr.add(ret, c, ret)
diff -up src/sage/rings/finite_rings/element_givaro.pxd.orig src/sage/rings/finite_rings/element_givaro.pxd
--- src/sage/rings/finite_rings/element_givaro.pxd.orig 2015-07-26 07:34:44.000000000 -0600
+++ src/sage/rings/finite_rings/element_givaro.pxd 2016-02-26 17:45:57.983303693 -0700
@@ -13,7 +13,7 @@ cdef extern from "givaro/givrandom.h":
GivRandom GivRandomSeeded "Givaro::GivRandom"(unsigned long seed)
-cdef extern from "givaro/givgfq.h":
+cdef extern from "givaro/gfq.h":
ctypedef struct intvec "std::vector<unsigned int>":
void (* push_back)(int elem)
@@ -21,7 +21,7 @@ cdef extern from "givaro/givgfq.h":
intvec intvec_factory "std::vector<unsigned int>"(int len)
-cdef extern from "givaro/givgfq.h":
+cdef extern from "givaro/gfq.h":
ctypedef struct GivaroGfq "Givaro::GFqDom<int>":
#attributes
from libc.stdint cimport int64_t

View file

@ -1,15 +1,15 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2016-08-10 11:12:07.237021979 -0400
+++ src/module_list.py 2016-08-10 11:12:44.420023403 -0400
@@ -89,6 +89,7 @@ except ValueError:
--- 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']
+singular_incs = [SAGE_INC + '/singular', SAGE_INC + '/factory']
#########################################################
### Givaro flags
@@ -172,16 +173,19 @@ ext_modules = [
### 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,
@ -29,7 +29,7 @@ diff -up src/module_list.py.orig src/module_list.py
language="c++"),
Extension('sage.algebras.quatalg.quaternion_algebra_cython',
@@ -632,7 +636,8 @@ ext_modules = [
@@ -644,7 +648,8 @@ ext_modules = [
[])),
Extension('sage.libs.lrcalc.lrcalc',
@ -39,13 +39,12 @@ diff -up src/module_list.py.orig src/module_list.py
Extension('sage.libs.pari.closure',
sources = ["sage/libs/pari/closure.pyx"]),
@@ -665,33 +670,39 @@ ext_modules = [
@@ -677,31 +682,37 @@ ext_modules = [
Extension('sage.libs.singular.singular',
sources = ['sage/libs/singular/singular.pyx'],
libraries = ['givaro'] + singular_libs,
libraries = singular_libs,
+ include_dirs = singular_incs,
language="c++",
extra_compile_args = givaro_extra_compile_args),
language="c++"),
Extension('sage.libs.singular.polynomial',
sources = ['sage/libs/singular/polynomial.pyx'],
@ -69,8 +68,7 @@ diff -up src/module_list.py.orig src/module_list.py
sources = ['sage/libs/singular/function.pyx'],
libraries = singular_libs,
+ include_dirs = singular_incs,
language="c++",
extra_compile_args = givaro_extra_compile_args),
language="c++"),
Extension('sage.libs.singular.option',
sources = ['sage/libs/singular/option.pyx'],
@ -79,7 +77,7 @@ diff -up src/module_list.py.orig src/module_list.py
language="c++"),
Extension('sage.libs.symmetrica.symmetrica',
@@ -700,17 +711,21 @@ ext_modules = [
@@ -710,17 +721,21 @@ ext_modules = [
Extension('sage.libs.mpmath.utils',
sources = ["sage/libs/mpmath/utils.pyx"],
@ -105,7 +103,7 @@ diff -up src/module_list.py.orig src/module_list.py
###################################
##
@@ -718,7 +733,8 @@ ext_modules = [
@@ -728,7 +743,8 @@ ext_modules = [
##
###################################
@ -115,7 +113,7 @@ diff -up src/module_list.py.orig src/module_list.py
###################################
##
@@ -891,7 +907,7 @@ ext_modules = [
@@ -901,7 +917,7 @@ ext_modules = [
Extension("sage.matrix.matrix_complex_ball_dense",
["sage/matrix/matrix_complex_ball_dense.pyx"],
libraries=['arb', 'mpfi', 'mpfr'],
@ -124,7 +122,7 @@ diff -up src/module_list.py.orig src/module_list.py
language = "c++"),
Extension('sage.matrix.matrix_complex_double_dense',
@@ -963,6 +979,7 @@ ext_modules = [
@@ -971,6 +987,7 @@ ext_modules = [
Extension('sage.matrix.matrix_mpolynomial_dense',
sources = ['sage/matrix/matrix_mpolynomial_dense.pyx'],
libraries = singular_libs,
@ -132,7 +130,7 @@ diff -up src/module_list.py.orig src/module_list.py
language="c++"),
Extension('sage.matrix.matrix_rational_dense',
@@ -1284,6 +1301,7 @@ ext_modules = [
@@ -1288,6 +1305,7 @@ ext_modules = [
Extension("sage.rings.complex_arb",
["sage/rings/complex_arb.pyx"],
libraries=['mpfi', 'mpfr', 'gmp'],
@ -140,7 +138,7 @@ diff -up src/module_list.py.orig src/module_list.py
language = 'c++'),
Extension('sage.rings.complex_double',
@@ -1356,6 +1374,7 @@ ext_modules = [
@@ -1360,6 +1378,7 @@ ext_modules = [
Extension("sage.rings.real_arb",
["sage/rings/real_arb.pyx"],
libraries = ['mpfi', 'mpfr'],
@ -148,7 +146,7 @@ diff -up src/module_list.py.orig src/module_list.py
language = 'c++'),
Extension('sage.rings.real_lazy',
@@ -1562,17 +1581,20 @@ ext_modules = [
@@ -1564,16 +1583,19 @@ ext_modules = [
Extension('sage.rings.polynomial.multi_polynomial_ideal_libsingular',
sources = ['sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx'],
libraries = singular_libs,
@ -159,8 +157,7 @@ diff -up src/module_list.py.orig src/module_list.py
sources = ['sage/rings/polynomial/plural.pyx'],
libraries = ['m', 'readline', 'singular', 'givaro', 'gmpxx', 'gmp'],
+ include_dirs = singular_incs,
language="c++",
extra_compile_args = givaro_extra_compile_args),
language="c++"),
Extension('sage.rings.polynomial.multi_polynomial_libsingular',
sources = ['sage/rings/polynomial/multi_polynomial_libsingular.pyx'],
@ -170,11 +167,11 @@ diff -up src/module_list.py.orig src/module_list.py
Extension('sage.rings.polynomial.multi_polynomial_ring_generic',
diff -up src/setup.py.orig src/setup.py
--- src/setup.py.orig 2016-08-10 11:12:07.241021980 -0400
+++ src/setup.py 2016-08-10 11:12:09.577022069 -0400
@@ -65,6 +65,7 @@ except KeyError:
--- 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:
# search for dependencies and add to gcc -I<path>
# this depends on SAGE_CYTHONIZED
include_dirs = sage_include_directories(use_sources=True)
+include_dirs.extend(['@@CYSIGNALS@@'])

File diff suppressed because it is too large Load diff

View file

@ -1,365 +0,0 @@
diff -up src/sage/interfaces/all.py.orig src/sage/interfaces/all.py
--- src/sage/interfaces/all.py.orig 2016-08-15 07:14:53.947426922 -0400
+++ src/sage/interfaces/all.py 2016-08-15 07:15:06.645427409 -0400
@@ -48,8 +48,8 @@ interfaces = ['gap', 'gap3', 'giac', 'gp
'singular', 'sage0', 'sage']
-from sage.repl.rich_output.display_manager import get_display_manager
-if get_display_manager().is_in_terminal():
+from sage.repl.rich_output.display_manager import is_in_terminal
+if is_in_terminal():
from .axiom import axiom_console
from .fricas import fricas_console
from .gap import gap_console
diff -up src/sage/interfaces/axiom.py.orig src/sage/interfaces/axiom.py
--- src/sage/interfaces/axiom.py.orig 2016-08-15 07:15:43.388428816 -0400
+++ src/sage/interfaces/axiom.py 2016-08-15 07:15:54.357429236 -0400
@@ -1040,8 +1040,8 @@ def axiom_console():
-----------------------------------------------------------------------------
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%axiom magics instead.')
os.system('axiom -nox')
diff -up src/sage/interfaces/fricas.py.orig src/sage/interfaces/fricas.py
--- src/sage/interfaces/fricas.py.orig 2016-08-15 07:23:50.475447468 -0400
+++ src/sage/interfaces/fricas.py 2016-08-15 07:23:57.869447751 -0400
@@ -339,8 +339,8 @@ def fricas_console():
Issue )quit to leave AXIOM and return to shell.
-----------------------------------------------------------------------------
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%fricas magics instead.')
os.system('fricas -nox')
diff -up src/sage/interfaces/gap3.py.orig src/sage/interfaces/gap3.py
--- src/sage/interfaces/gap3.py.orig 2016-08-15 07:15:18.659427869 -0400
+++ src/sage/interfaces/gap3.py 2016-08-15 07:15:36.381428547 -0400
@@ -886,8 +886,8 @@ def gap3_console():
For help enter: ?<return>
gap>
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%gap3 magics instead.')
os.system(gap3_cmd)
diff -up src/sage/interfaces/gap.py.orig src/sage/interfaces/gap.py
--- src/sage/interfaces/gap.py.orig 2016-08-15 07:20:26.092439641 -0400
+++ src/sage/interfaces/gap.py 2016-08-15 07:20:49.334440531 -0400
@@ -1889,8 +1889,8 @@ def gap_console():
sage: 'sorry' not in gap_startup
True
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%gap magics instead.')
cmd, _ = gap_command(use_workspace_cache=False)
cmd += ' ' + os.path.join(SAGE_EXTCODE,'gap','console.g')
diff -up src/sage/interfaces/giac.py.orig src/sage/interfaces/giac.py
--- src/sage/interfaces/giac.py.orig 2016-08-15 07:18:26.900435077 -0400
+++ src/sage/interfaces/giac.py 2016-08-15 07:18:36.989435464 -0400
@@ -1135,8 +1135,8 @@ def giac_console():
Press CTRL and D simultaneously to finish session
Type ?commandname for help
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%giac magics instead.')
os.system('giac')
diff -up src/sage/interfaces/gnuplot.py.orig src/sage/interfaces/gnuplot.py
--- src/sage/interfaces/gnuplot.py.orig 2016-08-15 07:22:26.123444238 -0400
+++ src/sage/interfaces/gnuplot.py 2016-08-15 07:22:35.181444585 -0400
@@ -190,8 +190,8 @@ gnuplot = Gnuplot()
def gnuplot_console():
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%gnuplot magics instead.')
os.system('sage-native-execute gnuplot')
diff -up src/sage/interfaces/gp.py.orig src/sage/interfaces/gp.py
--- src/sage/interfaces/gp.py.orig 2016-08-15 07:17:56.988433932 -0400
+++ src/sage/interfaces/gp.py 2016-08-15 07:18:05.213434247 -0400
@@ -1099,8 +1099,8 @@ def gp_console():
compiled: Jul 21 2010, gcc-4.6.0 20100705 (experimental) (GCC)
(readline v6.0 enabled, extended help enabled)
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%gp magics instead.')
os.system('gp')
diff -up src/sage/interfaces/kash.py.orig src/sage/interfaces/kash.py
--- src/sage/interfaces/kash.py.orig 2016-08-15 07:23:15.164446116 -0400
+++ src/sage/interfaces/kash.py 2016-08-15 07:23:25.325446505 -0400
@@ -699,8 +699,8 @@ def reduce_load_Kash():
def kash_console():
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%kash magics instead.')
os.system("kash3 ")
diff -up src/sage/interfaces/lie.py.orig src/sage/interfaces/lie.py
--- src/sage/interfaces/lie.py.orig 2016-08-15 07:16:01.284429501 -0400
+++ src/sage/interfaces/lie.py 2016-08-15 07:16:15.237430035 -0400
@@ -935,8 +935,8 @@ def lie_console():
...
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%lie magics instead.')
os.system('bash `which lie`')
diff -up src/sage/interfaces/lisp.py.orig src/sage/interfaces/lisp.py
--- src/sage/interfaces/lisp.py.orig 2016-08-15 07:21:51.364442907 -0400
+++ src/sage/interfaces/lisp.py 2016-08-15 07:22:00.925443273 -0400
@@ -550,7 +550,7 @@ def lisp_console():
Type :h for Help. Top level.
...
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%lisp magics instead.')
os.system('ecl')
diff -up src/sage/interfaces/macaulay2.py.orig src/sage/interfaces/macaulay2.py
--- src/sage/interfaces/macaulay2.py.orig 2016-08-15 07:17:39.196433250 -0400
+++ src/sage/interfaces/macaulay2.py 2016-08-15 07:17:48.989433625 -0400
@@ -1222,8 +1222,8 @@ def macaulay2_console():
...
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%macaulay2 magics instead.')
os.system('M2')
diff -up src/sage/interfaces/magma.py.orig src/sage/interfaces/magma.py
--- src/sage/interfaces/magma.py.orig 2016-08-15 07:22:42.763444875 -0400
+++ src/sage/interfaces/magma.py 2016-08-15 07:22:52.398445244 -0400
@@ -2775,8 +2775,8 @@ def magma_console():
>
Total time: 2.820 seconds, Total memory usage: 3.95MB
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%magma magics instead.')
console('sage-native-execute magma')
diff -up src/sage/interfaces/maple.py.orig src/sage/interfaces/maple.py
--- src/sage/interfaces/maple.py.orig 2016-08-15 07:22:08.740443572 -0400
+++ src/sage/interfaces/maple.py 2016-08-15 07:22:19.149443971 -0400
@@ -1175,8 +1175,8 @@ def maple_console():
| Type ? for help.
>
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%maple magics instead.')
os.system('maple')
diff -up src/sage/interfaces/mathematica.py.orig src/sage/interfaces/mathematica.py
--- src/sage/interfaces/mathematica.py.orig 2016-08-15 07:17:01.475431806 -0400
+++ src/sage/interfaces/mathematica.py 2016-08-15 07:17:13.797432278 -0400
@@ -1007,8 +1007,8 @@ def reduce_load(X):
def mathematica_console(readline=True):
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%mathematica magics instead.')
if not readline:
os.system('math')
diff -up src/sage/interfaces/matlab.py.orig src/sage/interfaces/matlab.py
--- src/sage/interfaces/matlab.py.orig 2016-08-15 07:18:11.755434497 -0400
+++ src/sage/interfaces/matlab.py 2016-08-15 07:18:20.261434823 -0400
@@ -389,8 +389,8 @@ def matlab_console():
matlab, like Sage, remembers its history from one session to
another.
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%matlab magics instead.')
os.system('matlab -nodisplay')
diff -up src/sage/interfaces/maxima_abstract.py.orig src/sage/interfaces/maxima_abstract.py
--- src/sage/interfaces/maxima_abstract.py.orig 2016-08-15 07:24:41.539449423 -0400
+++ src/sage/interfaces/maxima_abstract.py 2016-08-15 07:24:50.822449779 -0400
@@ -2370,7 +2370,7 @@ def maxima_console():
Maxima 5.34.1 http://maxima.sourceforge.net
...
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%maxima magics instead.')
os.system('maxima')
diff -up src/sage/interfaces/mupad.py.orig src/sage/interfaces/mupad.py
--- src/sage/interfaces/mupad.py.orig 2016-08-15 07:24:03.851447980 -0400
+++ src/sage/interfaces/mupad.py 2016-08-15 07:24:11.957448291 -0400
@@ -686,8 +686,8 @@ def mupad_console():
*----* Licensed to: ...
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%mupad magics instead.')
os.system('mupkern')
diff -up src/sage/interfaces/mwrank.py.orig src/sage/interfaces/mwrank.py
--- src/sage/interfaces/mwrank.py.orig 2016-08-15 07:22:59.484445515 -0400
+++ src/sage/interfaces/mwrank.py 2016-08-15 07:23:08.637445866 -0400
@@ -360,8 +360,8 @@ def mwrank_console():
sage: mwrank_console() # not tested: expects console input
Program mwrank: ...
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%mwrank magics instead.')
os.system('mwrank')
diff -up src/sage/interfaces/octave.py.orig src/sage/interfaces/octave.py
--- src/sage/interfaces/octave.py.orig 2016-08-15 07:24:17.604448507 -0400
+++ src/sage/interfaces/octave.py 2016-08-15 07:24:26.741448857 -0400
@@ -775,8 +775,8 @@ def octave_console():
octave, like Sage, remembers its history from one session to
another.
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%octave magics instead.')
os.system('octave')
diff -up src/sage/interfaces/qepcad.py.orig src/sage/interfaces/qepcad.py
--- src/sage/interfaces/qepcad.py.orig 2016-08-15 07:23:32.595446783 -0400
+++ src/sage/interfaces/qepcad.py 2016-08-15 07:23:43.510447201 -0400
@@ -1681,8 +1681,8 @@ def qepcad_console(memcells=None):
...
Enter an informal description between '[' and ']':
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%qepcat magics instead.')
# This will only spawn local processes
os.system(_qepcad_cmd(memcells))
diff -up src/sage/interfaces/r.py.orig src/sage/interfaces/r.py
--- src/sage/interfaces/r.py.orig 2016-08-15 07:16:22.108430298 -0400
+++ src/sage/interfaces/r.py 2016-08-15 07:16:35.381430807 -0400
@@ -2102,8 +2102,8 @@ def r_console():
ISBN 3-900051-07-0
...
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%r magics instead.')
# This will only spawn local processes
os.system('R --vanilla')
diff -up src/sage/interfaces/sage0.py.orig src/sage/interfaces/sage0.py
--- src/sage/interfaces/sage0.py.orig 2016-08-15 07:18:49.708435951 -0400
+++ src/sage/interfaces/sage0.py 2016-08-15 07:18:59.709436334 -0400
@@ -531,8 +531,8 @@ def sage0_console():
----------------------------------------------------------------------
...
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%sage0 magics instead.')
os.system('sage')
diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py
--- src/sage/interfaces/singular.py.orig 2016-08-15 07:16:42.556431082 -0400
+++ src/sage/interfaces/singular.py 2016-08-15 07:16:52.990431481 -0400
@@ -2329,8 +2329,8 @@ def singular_console():
by: G.-M. Greuel, G. Pfister, H. Schoenemann \ Nov 2007
FB Mathematik der Universitaet, D-67653 Kaiserslautern \
"""
- from sage.repl.rich_output.display_manager import get_display_manager
- if not get_display_manager().is_in_terminal():
+ from sage.repl.rich_output.display_manager import is_in_terminal
+ if not is_in_terminal():
raise RuntimeError('Can use the console only in the terminal. Try %%singular magics instead.')
os.system('Singular')
diff -up src/sage/repl/interface_magic.py.orig src/sage/repl/interface_magic.py
--- src/sage/repl/interface_magic.py.orig 2016-08-15 07:19:09.596436712 -0400
+++ src/sage/repl/interface_magic.py 2016-08-15 07:21:27.789442004 -0400
@@ -35,7 +35,7 @@ language to separate multiple commands.
#*****************************************************************************
-from sage.repl.rich_output.display_manager import get_display_manager
+from sage.repl.rich_output.display_manager import is_in_terminal
LINE_DOCSTRING = """
@@ -218,7 +218,7 @@ class InterfaceMagic(object):
The line magic %gap sends a single line to the gap interface.
...
"""
- terminal = get_display_manager().is_in_terminal()
+ terminal = is_in_terminal()
def line_magic(line):
if line:
return self._interface(line)
diff -up src/sage/repl/rich_output/display_manager.py.orig src/sage/repl/rich_output/display_manager.py
--- src/sage/repl/rich_output/display_manager.py.orig 2016-08-15 07:13:57.603424765 -0400
+++ src/sage/repl/rich_output/display_manager.py 2016-08-15 07:14:21.309425673 -0400
@@ -775,3 +775,6 @@ class DisplayManager(SageObject):
get_display_manager = DisplayManager.get_instance
+def is_in_terminal():
+ from sage.repl.rich_output.backend_ipython import BackendIPythonCommandline
+ return isinstance(get_display_manager(), BackendIPythonCommandline)

View file

@ -1,7 +1,7 @@
diff -up src/sage/arith/multi_modular.pyx.orig src/sage/arith/multi_modular.pyx
--- src/sage/arith/multi_modular.pyx.orig 2016-08-09 07:06:34.166635024 -0400
+++ src/sage/arith/multi_modular.pyx 2016-08-09 07:06:58.190635944 -0400
@@ -171,9 +171,9 @@ cdef class MultiModularBasis_base(object
--- 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
@@ -172,9 +172,9 @@ cdef class MultiModularBasis_base(object
ArithmeticError: The inverse of 6 modulo 10 is not defined.
"""
if l_bound < 2:
@ -13,7 +13,7 @@ diff -up src/sage/arith/multi_modular.pyx.orig src/sage/arith/multi_modular.pyx
self._l_bound = l_bound
self._u_bound = u_bound
@@ -232,7 +232,7 @@ cdef class MultiModularBasis_base(object
@@ -233,7 +233,7 @@ cdef class MultiModularBasis_base(object
if check:
for p in plist:
if p > MAX_MODULUS:
@ -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-08-09 07:06:34.179635024 -0400
+++ src/sage/rings/finite_rings/integer_mod.pyx 2016-08-09 07:07:05.471636223 -0400
--- 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
@@ -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-08-09 07:06:34.157635023 -0400
+++ src/sage/structure/parent.pyx 2016-08-09 07:06:50.239635639 -0400
@@ -753,7 +753,7 @@ cdef class Parent(category_object.Catego
--- 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
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-08-09 07:06:34.173635024 -0400
+++ src/sage/symbolic/ring.pyx 2016-08-09 07:07:01.438636068 -0400
@@ -350,7 +350,7 @@ cdef class SymbolicRing(CommutativeRing)
--- 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)
from sage.misc.all import prod
return prod([SR(p)**e for p,e in x], SR(x.unit()))
else:

View file

@ -1,25 +1,17 @@
diff -up src/sage/libs/pari/handle_error.pxd.orig src/sage/libs/pari/handle_error.pxd
--- src/sage/libs/pari/handle_error.pxd.orig 2015-10-11 17:43:43.037782565 -0300
+++ src/sage/libs/pari/handle_error.pxd 2015-10-11 17:46:28.004788882 -0300
--- 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 @@
include 'sage/libs/pari/decl.pxi'
from .types cimport GEN
cdef void _pari_init_error_handling()
-cdef int _pari_err_handle(GEN E) except 0
+cdef int _pari_handle_exception(long errnum_unused) except 0
cdef void _pari_err_recover(long errnum)
diff -up src/sage/libs/pari/handle_error.pyx.orig src/sage/libs/pari/handle_error.pyx
--- src/sage/libs/pari/handle_error.pyx.orig 2015-10-11 17:43:43.023782564 -0300
+++ src/sage/libs/pari/handle_error.pyx 2015-10-11 17:45:11.844785966 -0300
@@ -131,13 +131,13 @@ cdef void _pari_init_error_handling():
sage: pari('warning("test")')
*** user warning: test
"""
- global cb_pari_err_handle
+ global cb_pari_handle_exception
global cb_pari_err_recover
- cb_pari_err_handle = _pari_err_handle
+ cb_pari_handle_exception = _pari_handle_exception
--- 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
@ -28,34 +20,35 @@ diff -up src/sage/libs/pari/handle_error.pyx.orig src/sage/libs/pari/handle_erro
"""
Convert a PARI error into a Sage exception, unless the error was
a stack overflow, in which case we enlarge the stack.
@@ -156,6 +156,7 @@ cdef int _pari_err_handle(GEN E) except
@@ -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]
if errnum == e_STACK:
# PARI is out of memory. We double the size of the PARI stack
@@ -165,15 +166,10 @@ cdef int _pari_err_handle(GEN E) except
sig_block()
cdef char* errstr
- cdef char* s
try:
errstr = pari_err2str(E)
pari_error_string = errstr.decode('ascii')
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:
pari_free(errstr)
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 2015-10-11 17:43:43.028782564 -0300
+++ src/sage/libs/pari/pari_instance.pxd 2015-10-11 17:45:37.884786963 -0300
@@ -7,6 +7,10 @@ cimport cython
--- 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
@ -64,21 +57,21 @@ diff -up src/sage/libs/pari/pari_instance.pxd.orig src/sage/libs/pari/pari_insta
+ cdef void mp_set_memory_functions(void*, void*, void*)
+
cpdef long prec_bits_to_words(unsigned long prec_in_bits)
cdef class PariInstance_auto(ParentWithBase):
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 2015-10-11 17:43:43.032782565 -0300
+++ src/sage/libs/pari/pari_instance.pyx 2015-10-11 17:46:14.596788369 -0300
@@ -429,7 +429,12 @@ cdef class PariInstance(PariInstance_aut
# The size here doesn't really matter, because we will allocate
# our own stack anyway. We ask PARI not to set up signal and
# error handlers.
--- 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(10000, maxprime, INIT_DFTm)
pari_init_opts(size, maxprime, INIT_DFTm)
+ mp_set_memory_functions(_gmp_malloc, _gmp_realloc, _gmp_free)
sizemax = mem.virtual_memory_limit() // 4
# Disable PARI's stack overflow checking which is incompatible
# with multi-threading.

View file

@ -1,6 +1,6 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2016-08-08 13:18:16.519494566 -0400
+++ src/module_list.py 2016-08-08 13:18:29.570495066 -0400
--- 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
@@ -3,7 +3,7 @@ from glob import glob
from distutils.extension import Extension
from sage.env import SAGE_LOCAL
@ -10,10 +10,22 @@ 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
ext_modules = [Extension('%s', sources=['%s.%s', %s],
libraries=%s,
- library_dirs=[SAGE_LOCAL + '/lib/'] + %s,
+ library_dirs=[os.path.realpath(SAGE_LOCAL + '/lib/')] + %s,
extra_compile_args = extra_compile_args,
language = '%s' )]
diff -up src/setup.py.orig src/setup.py
--- src/setup.py.orig 2016-08-08 13:19:09.383496590 -0400
+++ src/setup.py 2016-08-08 13:20:41.161500105 -0400
@@ -561,11 +561,9 @@ def run_cythonize():
--- 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
@ -26,8 +38,8 @@ diff -up src/setup.py.orig src/setup.py
+ Cython.Compiler.Main.default_options['cache'] = True
force = True
version_file = os.path.join(os.path.dirname(__file__), '.cython_version')
@@ -618,21 +616,6 @@ print("Discovered Python/Cython sources,
version_file = os.path.join(SAGE_CYTHONIZED, '.cython_version')
@@ -641,21 +639,6 @@ print("Discovered Python/Cython sources,
#########################################################
@ -37,7 +49,7 @@ diff -up src/setup.py.orig src/setup.py
-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(SAGE_SRC, 'build', 'lib*'))
-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,
@ -49,15 +61,3 @@ diff -up src/setup.py.orig src/setup.py
### Install also Jupyter kernel spec
#########################################################
diff -up src/sage/misc/cython.py.orig src/sage/misc/cython.py
--- src/sage/misc/cython.py.orig 2016-08-24 11:51:48.802265784 -0400
+++ src/sage/misc/cython.py 2016-08-24 11:52:36.723267619 -0400
@@ -426,7 +426,7 @@ extra_compile_args = %s
ext_modules = [Extension('%s', sources=['%s.%s', %s],
libraries=%s,
- library_dirs=[SAGE_LOCAL + '/lib/'] + %s,
+ library_dirs=[os.path.realpath(SAGE_LOCAL + '/lib/')] + %s,
extra_compile_args = extra_compile_args,
language = '%s' )]

View file

@ -1,7 +1,7 @@
diff -up src/doc/common/conf.py.orig src/doc/common/conf.py
--- src/doc/common/conf.py.orig 2016-08-08 13:21:49.624502727 -0400
+++ src/doc/common/conf.py 2016-08-08 13:22:19.945503888 -0400
@@ -218,7 +218,7 @@ if (os.environ.get('SAGE_DOC_MATHJAX', '
--- 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', '
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-08-08 13:22:48.247504971 -0400
+++ src/sage/doctest/control.py 2016-08-08 13:23:38.842506909 -0400
--- 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
@@ -95,7 +95,6 @@ class DocTestDefaults(SageObject):
self.valgrind = False
self.massif = False
@ -30,7 +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:
@@ -636,7 +635,6 @@ class DocTestController(SageObject):
@@ -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'))
@ -38,7 +38,7 @@ diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py
self.files.append(SAGE_DOC_SRC)
self.options.sagenb = True
DOT_GIT= opj(SAGE_ROOT, '.git')
@@ -1031,13 +1029,8 @@ class DocTestController(SageObject):
@@ -1030,13 +1028,8 @@ class DocTestController(SageObject):
elif opt.cachegrind:
toolname = "cachegrind"
flags = os.getenv("SAGE_CACHEGRIND_FLAGS", "")
@ -52,7 +52,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
@@ -1097,10 +1090,10 @@ class DocTestController(SageObject):
@@ -1096,10 +1089,10 @@ class DocTestController(SageObject):
0
"""
opt = self.options
@ -66,9 +66,9 @@ diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py
return self.run_val_gdb()
else:
diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py
--- src/sage/interfaces/singular.py.orig 2016-08-08 13:23:50.344507349 -0400
+++ src/sage/interfaces/singular.py 2016-08-08 13:24:08.618508049 -0400
@@ -2249,7 +2249,7 @@ def generate_docstring_dictionary():
--- 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():
nodes.clear()
node_names.clear()
@ -78,9 +78,9 @@ diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py
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-08-10 14:37:02.566492810 -0400
+++ src/sage_setup/docbuild/ext/multidocs.py 2016-08-10 14:37:31.238493908 -0400
@@ -78,8 +78,11 @@ def merge_environment(app, env):
--- 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
@@ -83,8 +83,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())
@ -95,8 +95,8 @@ 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-08-10 14:33:38.854485009 -0400
+++ src/sage_setup/docbuild/__init__.py 2016-08-10 14:34:22.591486684 -0400
--- 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):
# apply_async does not, so don't use it.
x = pool.map_async(build_other_doc, L, 1)

View file

@ -1,7 +1,24 @@
diff -up src/bin/sage.orig src/bin/sage
--- src/bin/sage.orig 2016-08-08 13:05:27.823465130 -0400
+++ src/bin/sage 2016-08-08 13:12:27.114481186 -0400
@@ -13,20 +13,16 @@ usage() {
--- src/bin/sage.orig 2016-12-30 06:31:16.930949819 -0500
+++ src/bin/sage 2016-12-30 06:31:50.812950266 -0500
@@ -1,5 +1,16 @@
#!/usr/bin/env bash
+# Display the Sage startup banner, used in src/bin/sage
+sage_banner() {
+ if [ "$SAGE_BANNER" = "bare" ]; then
+ cat "$SAGE_ROOT/VERSION.txt"
+ elif [ "$SAGE_BANNER" != "no" ]; then
+ # This file sage-banner is not yet available during the build
+ # of Sage, so we ignore errors from cat.
+ cat "$SAGE_LOCAL/bin/sage-banner" 2>/dev/null
+ fi
+}
+
help_banner() {
sage_banner | grep -v 'Type'
echo
@@ -13,20 +24,16 @@ usage() {
echo " file.[sage|py|spyx] -- run given .sage, .py or .spyx file"
echo " -advanced -- list all command line options"
echo " -c <cmd> -- Evaluates cmd as sage code"
@ -22,7 +39,7 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -python [...] -- run the Python interpreter"
echo " -R [...] -- run Sage's R with given arguments"
echo " -singular [...] -- run Sage's singular with given arguments"
@@ -42,10 +38,6 @@ usage() {
@@ -42,10 +49,6 @@ usage() {
echo " --optional - controls which optional tests are run"
echo " --sagenb - test all sagenb files"
echo " --help - show all testing options"
@ -33,7 +50,7 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -v, -version -- display Sage version information"
exit 0
}
@@ -64,11 +56,8 @@ usage_advanced() {
@@ -64,11 +67,8 @@ usage_advanced() {
echo " -preparse <file.sage> -- preparse file.sage and produce corresponding file.sage.py"
echo " -q -- quiet; start with no banner"
echo " -root -- print the Sage root directory"
@ -45,7 +62,7 @@ diff -up src/bin/sage.orig src/bin/sage
echo
#### 1.......................26..................................................78
@@ -78,8 +67,6 @@ usage_advanced() {
@@ -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"
@ -54,7 +71,7 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -inotebook [...] -- start the *insecure* Sage notebook (deprecated)"
echo " -n, -notebook [...] -- start the default Sage notebook (options are the"
echo " same as for the notebook command in Sage). See the"
@@ -98,12 +85,9 @@ usage_advanced() {
@@ -98,18 +96,12 @@ 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"
@ -64,10 +81,16 @@ 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"
@@ -118,49 +102,7 @@ usage_advanced() {
echo " -polymake [...] -- run Sage's Polymake with given arguments"
- command -v polymake &>/dev/null || \
- 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() {
echo
#### 1.......................26..................................................78
#### |.....................--.|...................................................|
@ -118,7 +141,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"
@@ -190,7 +132,6 @@ usage_advanced() {
@@ -193,7 +143,6 @@ usage_advanced() {
echo " -coverage <files> -- give info about doctest coverage of files"
echo " -coverageall -- give summary info about doctest coverage of all"
echo " files in the Sage library"
@ -126,7 +149,7 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -search_src <string> -- search through all the Sage library code for string"
echo " -search_doc <string> -- search through the Sage documentation for string"
echo " -grep <string> -- same as -search_src"
@@ -210,16 +151,6 @@ usage_advanced() {
@@ -213,16 +162,6 @@ usage_advanced() {
echo
#### 1.......................26..................................................78
#### |.....................--.|...................................................|
@ -143,7 +166,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"
@@ -233,9 +164,6 @@ usage_advanced() {
@@ -236,9 +175,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"
@ -153,7 +176,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'."
@@ -260,86 +188,6 @@ if [ "$1" = '--nodotsage' ]; then
@@ -263,87 +199,6 @@ if [ "$1" = '--nodotsage' ]; then
exit $status
fi
@ -237,10 +260,11 @@ diff -up src/bin/sage.orig src/bin/sage
- exit 1
-fi
-
-
if [ $# -gt 0 ]; then
if [ "$1" = '-h' -o "$1" = '-?' -o "$1" = '-help' -o "$1" = '--help' ]; then
@@ -352,26 +200,12 @@ fi
usage
@@ -355,23 +210,10 @@ fi
# Prepare for running Sage, either interactively or non-interactively.
sage_setup() {
@ -255,19 +279,16 @@ diff -up src/bin/sage.orig src/bin/sage
- echo >&2 '************************************************************************'
- exit 1
- fi
-
# Display the startup banner (unless SAGE_BANNER is explictly "no")
if [ "$SAGE_BANNER" != "no" ]; then
# can be 'bare', or 'yes', or unspecified
echo "$SAGE_BANNER_TEXT"
fi
sage_banner
- maybe_sage_location
-
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 +216,6 @@ sage_setup() {
@@ -382,20 +224,6 @@ sage_setup() {
}
@ -288,7 +309,7 @@ diff -up src/bin/sage.orig src/bin/sage
# Start an interactive Sage session, this function never returns.
interactive_sage() {
sage_setup
@@ -467,7 +287,7 @@ fi
@@ -472,7 +300,7 @@ fi
if [ "$1" = '-singular' -o "$1" = '--singular' ]; then
shift
@ -297,7 +318,7 @@ diff -up src/bin/sage.orig src/bin/sage
fi
if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then
@@ -495,16 +315,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ]
@@ -500,16 +328,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ]
exec ecl "$@"
fi
@ -314,19 +335,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
shift
exec maxima "$@"
@@ -530,11 +340,6 @@ if [ "$1" = '-pip' -o "$1" = '--pip' ];
exec pip "$@"
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 "$@"
@@ -555,11 +360,6 @@ if [ "$1" = '-git' -o "$1" = '--git' ];
@@ -560,11 +378,6 @@ if [ "$1" = '-git' -o "$1" = '--git' ];
exec git "$@"
fi
@ -338,7 +347,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
@@ -679,20 +479,6 @@ EOF
@@ -684,20 +497,6 @@ EOF
fi
#####################################################################
@ -359,7 +368,7 @@ diff -up src/bin/sage.orig src/bin/sage
# File conversion
#####################################################################
@@ -710,11 +496,6 @@ fi
@@ -715,11 +514,6 @@ fi
# Run Sage's versions of the standard Algebra/Geometry etc. software
#####################################################################
@ -371,7 +380,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 "$@"
@@ -725,13 +506,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not
@@ -730,13 +524,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not
exec sage-notebook "$@"
fi
@ -385,7 +394,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then
shift
sage-cleaner &>/dev/null &
@@ -750,38 +524,19 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep
@@ -755,31 +542,12 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep
exit 0
fi
@ -418,15 +427,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ ! -f "$DOT_SAGE"/init.sage ]; then
echo >&2 "init.sage does not exist ... creating"
touch "$DOT_SAGE"/init.sage
fi
SAGE_BANNER=no sage_setup
export PYTHONIOENCODING="utf-8" # Fix encoding for doctests
- if [ "$1" = '-tp' -o "$1" = '-btp' ]; then
+ if [ "$1" = '-tp' ]; then
shift
exec sage-runtests -p "$@"
else
@@ -790,16 +545,6 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1"
@@ -795,10 +563,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1"
fi
fi
@ -434,24 +435,14 @@ diff -up src/bin/sage.orig src/bin/sage
- if [ "$1" = '-btnew' ]; then
- build_sage
- fi
- shift
- SAGE_BANNER=no sage_setup
- export PYTHONIOENCODING="utf-8" # Fix encoding for doctests
- exec sage-runtests --new "$@"
-fi
-
if [ "$1" = '-testall' -o "$1" = "--testall" ]; then
+if [ "$1" = '-tnew' ]; then
shift
SAGE_BANNER=no sage_setup
@@ -814,133 +559,6 @@ if [ "$1" = '-c' ]; then
exec sage-eval "$@"
export PYTHONIOENCODING="utf-8" # Fix encoding for doctests
@@ -824,114 +589,6 @@ if [ "$1" = '--location' ]; then
exit 0
fi
-if [ "$1" = '--location' ]; then
- maybe_sage_location
- exit 0
-fi
-
-
-install() {
- maybe_sage_location
@ -560,24 +551,10 @@ diff -up src/bin/sage.orig src/bin/sage
- exec python -m "sage_setup.docbuild" "$@"
-fi
-
-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
- cygdb "$SAGE_SRC/build" "$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
if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
shift
exec sage-preparse "$@"
@@ -975,21 +593,10 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca
sage_setup
@@ -980,26 +637,11 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca
exec sage-callgrind "$@"
fi
@ -597,11 +574,16 @@ diff -up src/bin/sage.orig src/bin/sage
-fi
-
if [ $# -ge 1 ]; then
T=`echo "$1" | sed -e "s/.*\.//"`
if [ "$T" = "spkg" ]; then
- T=`echo "$1" | sed -e "s/.*\.//"`
- if [ "$T" = "spkg" ]; then
- install "$@"
- fi
SAGE_BANNER=no sage_setup
unset TERM # See Trac #12263
exec sage-run "$@"
diff -up src/bin/sage-runtests.orig src/bin/sage-runtests
--- src/bin/sage-runtests.orig 2016-08-08 13:12:45.999481909 -0400
+++ src/bin/sage-runtests 2016-08-08 13:13:01.713482511 -0400
--- 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
@@ -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 " +
@ -614,8 +596,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-08-08 13:13:12.399482920 -0400
+++ src/bin/sage-valgrind 2016-08-08 13:13:37.233483871 -0400
--- 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
@@ -1,16 +1,6 @@
#!/usr/bin/env bash

View file

@ -1,16 +1,16 @@
diff -up src/sage/env.py.orig src/sage/env.py
--- src/sage/env.py.orig 2016-08-08 13:45:28.136557046 -0400
+++ src/sage/env.py 2016-08-08 13:46:17.426558934 -0400
--- src/sage/env.py.orig 2016-10-20 08:14:08.087552003 -0400
+++ src/sage/env.py 2016-10-20 08:14:40.929553260 -0400
@@ -89,7 +89,7 @@ _add_variable_or_fallback('HOSTNAME',
_add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid())
# bunch of sage directories and files
-_add_variable_or_fallback('SAGE_ROOT', None)
+_add_variable_or_fallback('SAGE_ROOT', '@@SAGE_ROOT@@')
_add_variable_or_fallback('SAGE_LOCAL', opj('$SAGE_ROOT', 'local'))
_add_variable_or_fallback('SAGE_LOCAL', None)
_add_variable_or_fallback('SAGE_ETC', opj('$SAGE_LOCAL', 'etc'))
_add_variable_or_fallback('SAGE_INC', opj('$SAGE_LOCAL', 'include'))
@@ -111,7 +111,7 @@ _add_variable_or_fallback('SAGE_CYTHONIZ
@@ -115,7 +115,7 @@ _add_variable_or_fallback('SAGE_PKGS', o
_add_variable_or_fallback('SAGE_EXTCODE', opj('$SAGE_SHARE', 'sage', 'ext'))
_add_variable_or_fallback('SAGE_LOGS', opj('$SAGE_ROOT', 'logs', 'pkgs'))
_add_variable_or_fallback('SAGE_SPKG_INST', opj('$SAGE_LOCAL', 'var', 'lib', 'sage', 'installed'))

View file

@ -2,6 +2,9 @@
%bcond_without bundled_pari
%bcond_with bundled_pexpect
%bcond_without bundled_ipython
%bcond_without install_hack
# for faster full rpm test builds
%ifarch %{ix86} x86_64
@ -35,8 +38,11 @@
%global elliptic_curves_pkg elliptic_curves-0.8
%global flintqs_pkg flintqs-1.0
%global graphs_pkg graphs-20151224
%if %{with bundled_ipython}
%global ipython_pkg ipython-5.0.0
%endif
%if %{with bundled_pari}
%global pari_pkg pari-2.8-2771-gb70b447
%global pari_pkg pari-2.8.0.alpha
%endif
%if %{with bundled_pexpect}
%global pexpect_pkg pexpect-4.1.0
@ -58,8 +64,8 @@
Name: sagemath
Group: Applications/Engineering
Summary: A free open-source mathematics software system
Version: 7.3
Release: 7%{?dist}
Version: 7.4
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
@ -174,13 +180,13 @@ Patch27: %{name}-includes.patch
Patch28: %{name}-gcc6.patch
# Use ipython3 (mostly a rediff from sagemath-6.8 sage/repl)
Patch29: %{name}-ipython3.patch
#Patch29: %{name}-ipython3.patch
# Use atlas blas
Patch30: %{name}-atlas.patch
# Correct side effect of sagemath-ipython3 patch
Patch31: %{name}-is_in_terminal.patch
#Patch31: %{name}-is_in_terminal.patch
# Update for python-flask-0.11.1
Patch32: %{name}-flask.patch
@ -256,7 +262,10 @@ BuildRequires: python-flask-autoindex
BuildRequires: python-flask-babel
BuildRequires: python-flask-openid
BuildRequires: python-flask-silk
%if %{without bundled_ipython}
BuildRequires: python-ipython
%endif
BuildRequires: python-future
BuildRequires: python-matplotlib
BuildRequires: python-networkx
%if %{without bundled_pexpect}
@ -264,6 +273,7 @@ BuildRequires: python-pexpect
%endif
BuildRequires: python-pkgconfig
BuildRequires: python-sphinx
BuildRequires: python-six
BuildRequires: python-twisted
BuildRequires: python-twisted-web
BuildRequires: R
@ -319,14 +329,21 @@ Requires: python-flask-autoindex
Requires: python-flask-babel
Requires: python-flask-openid
Requires: python-flask-silk
Requires: python-future
%if %{without bundled_ipython}
Requires: python-ipython
%endif
Requires: python-matplotlib
Requires: python-networkx
Requires: python-pathlib2
%if %{without bundled_pexpect}
Requires: python-pexpect
%endif
Requires: python-sphinx
Requires: python-pickleshare
Requires: python-prompt_toolkit
Requires: python-six
Requires: python-speaklater
Requires: python-sphinx
Requires: python-twisted
Requires: python-twisted-mail
Requires: python-twisted-web
@ -610,6 +627,13 @@ pushd build/pkgs/graphs
mv %{graphs_pkg} src
popd
%if %{with bundled_ipython}
pushd build/pkgs/ipython
tar zxf ../../../upstream/%{ipython_pkg}.tar.gz
mv %{ipython_pkg} src
popd
%endif
%if %{with bundled_pari}
pushd build/pkgs/pari
tar zxf ../../../upstream/%{pari_pkg}.tar.gz
@ -645,10 +669,9 @@ pushd build/pkgs/rubiks
tar jxf ../../../upstream/%{rubiks_pkg}.tar.bz2
mv %{rubiks_pkg} src
pushd src
cp ../patches/dietz-mcube-Makefile dietz/mcube/Makefile
cp ../patches/dietz-solver-Makefile dietz/solver/Makefile
cp ../patches/dietz-cu2-Makefile dietz/cu2/Makefile
cp ../patches/reid-Makefile reid/Makefile
for diff in `ls ../patches/*.patch`; do
patch -p1 < $diff
done
popd
popd
@ -699,9 +722,9 @@ popd
%patch26
%patch27
%patch28
%patch29
#%#patch29
%patch30
%patch31
#%#patch31
%patch32
%patch33
@ -744,10 +767,14 @@ export SAGE_INC=%{_includedir}
export SAGE_FORTRAN=%{_bindir}/gfortran
export SAGE_FORTRAN_LIB=`gfortran --print-file-name=libgfortran.so`
export DESTDIR=%{buildroot}
export SAGE_DEBUG=no
# Use file in /tmp because there are issues with long pathnames
export DOT_SAGE=/tmp/sage$$
mkdir -p $DOT_SAGE/tmp
# Avoid surprises due to change to src/build/temp.*$ARCH.*/...
export SAGE_CYTHONIZED=$SAGE_SRC/build/cythonized
# match system packages as sagemath packages
mkdir -p $SAGE_ROOT $SAGE_LOCAL
ln -sf %{_libdir} $SAGE_LOCAL/lib
@ -764,6 +791,13 @@ save_LOCAL=$SAGE_LOCAL
export PATH=%{_builddir}/bin:$PATH
export SAGE_LOCAL=%{_builddir}
%if %{with bundled_ipython}
pushd build/pkgs/ipython/src
%__python2 setup.py build
%__python2 setup.py install --root %{_builddir}
popd
%endif
%if %{with bundled_pari}
# Build bundled pari-2.8
pushd build/pkgs/pari/src
@ -799,9 +833,12 @@ export PYTHONPATH=%{_builddir}%{python_sitearch}:$PYTHONPATH
%if %{with cython_hack}
cp -far %{python_sitearch}/Cython %{_builddir}%{python_sitearch}
PATCH=$PWD/build/pkgs/cython/patches/pxi_sys_path.patch
BASE=$PWD/build/pkgs/cython/patches/
pushd %{_builddir}%{python_sitearch}
patch -p1 < $PATCH
for PATCH in pxi_sys_path.patch
do
patch -p1 < $BASE/$PATCH
done
# https://bugzilla.redhat.com/show_bug.cgi?id=1406533
sed -i 's/disallow/dissallow/' Cython/Compiler/Options.py
popd
@ -861,6 +898,7 @@ export SAGE_PYTHONPATH=%{buildroot}%{SAGE_PYTHONPATH}
export LD_LIBRARY_PATH=%{_builddir}/lib:$LD_LIBRARY_PATH
%endif
export DESTDIR=%{buildroot}
export SAGE_DEBUG=no
export DOT_SAGE=/tmp/sage$$
mkdir -p $DOT_SAGE/tmp
@ -909,10 +947,13 @@ popd
#------------------------------------------------------------------------
pushd src
# FIXME finishes but fails when exiting
# from sage.misc.randstate import current_randstate
# ImportError: No module named randstate
%__python2 -u setup.py install --root=%{buildroot} || :
%if %{without install_hack}
# FIXME tries to rebuild everything
%__python2 -u setup.py install --root=%{buildroot}
%else
mkdir -p %{buildroot}%{python_sitearch}
cp -far build/lib.linux-*/sage %{buildroot}%{python_sitearch}
%endif
%if %{with docs}
# install documentation sources
rm -fr $SAGE_DOC/{common,en,fr}
@ -1069,6 +1110,12 @@ pushd build/pkgs/sagetex/src
done
popd
#------------------------------------------------------------------------
%if %{with bundled_ipython}
mv %{_builddir}%{python_sitelib}/IPython %{buildroot}%{SAGE_PYTHONPATH}
mv %{_builddir}%{_bindir}/ip* %{buildroot}%{SAGE_LOCAL}/bin
%endif
#------------------------------------------------------------------------
cat > %{buildroot}%{_bindir}/sage << EOF
#!/bin/bash -i
@ -1272,8 +1319,10 @@ ln -s libpari-gmp-2.8.so.0.0.0 %{buildroot}%{SAGE_ROOT}/lib/libpari.so
perl -pi -e 's|(libdirs = cblas_library_dirs)|$1 + \["%{SAGE_ROOT}/lib"\]|;' %{buildroot}%{python_sitearch}/sage/misc/cython.py
%endif
%if %{without install_hack}
# remove sage_setup
rm -r %{buildroot}%{python_sitearch}/sage_setup
%endif
# pretend sagemath spkgs are installed to reduce number of errors
# in doctests
@ -1386,6 +1435,9 @@ exit 0
%if %{with bundled_pari}
%{SAGE_LOCAL}/bin/gp*
%endif
%if %{with bundled_ipython}
%{SAGE_LOCAL}/bin/ip*
%endif
%{SAGE_LOCAL}/bin/python
%{SAGE_LOCAL}/bin/sage*
%{SAGE_LOCAL}/include
@ -1415,9 +1467,14 @@ exit 0
# GPLv2+
%{SAGE_LOCAL}/bin/cysignals*
%{python_sitearch}/sage
%if %{without install_hack}
%{python_sitearch}/sage-*.egg-info
%endif
%{python_sitearch}/cysignals
%{python_sitearch}/cysignals-*.egg-info
%if %{with bundled_ipython}
%{SAGE_PYTHONPATH}/IPython
%endif
#------------------------------------------------------------------------
%files data
@ -1611,6 +1668,9 @@ exit 0
########################################################################
%changelog
* Fri Dec 30 2016 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 7.4-1
- Update to sagemath 7.4
* Tue Dec 20 2016 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 7.3.7
- Correct f24 to f25 upgrade, sagemath 6.8 to 7.3 (#1396848)

View file

@ -1 +1 @@
a289e955f9c94be3e4420ee86d8302a7 sage-7.3.tar.gz
SHA512 (sage-7.4.tar.gz) = e45d3b5617b190302e8fff9f281551d0b2c27710d860892d6511019272e2f80487e27ffe7dce6c1276da721817a8cbd7946fd5a2e32741e5cba1955496c1b041