Update to sagemath 7.3

This commit is contained in:
pcpa 2016-08-20 13:51:55 -04:00
parent a3d306800c
commit 0fdebf23cf
35 changed files with 3245 additions and 874 deletions

1
.gitignore vendored
View file

@ -9,3 +9,4 @@
/sage-6.4.1.tar.gz
/sage-6.5.tar.gz
/sage-6.8.tar.gz
/sage-7.3.tar.gz

View file

@ -1,8 +1,8 @@
diff -up src/sage/sandpiles/sandpile.py.orig src/sage/sandpiles/sandpile.py
--- src/sage/sandpiles/sandpile.py.orig 2015-10-11 17:41:27.067777358 -0300
+++ src/sage/sandpiles/sandpile.py 2015-10-11 17:41:57.909778539 -0300
@@ -347,9 +347,6 @@ from sage.rings.arith import falling_fac
from sage.rings.all import Integer, PolynomialRing, QQ, ZZ, lcm
--- 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
@@ -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
-# TODO: remove the following line once 4ti2 functions are removed
@ -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.
@@ -5230,7 +5227,7 @@ class SandpileDivisor(dict):
@@ -5229,7 +5226,7 @@ class SandpileDivisor(dict):
sign_file.close()
# compute
try:

View file

@ -1,46 +1,93 @@
diff -up src/sage/libs/arb/acb.pxd.orig src/sage/libs/arb/acb.pxd
--- src/sage/libs/arb/acb.pxd.orig 2015-11-03 18:52:50.311601612 -0200
+++ src/sage/libs/arb/acb.pxd 2015-11-03 18:52:55.730601820 -0200
@@ -1,6 +1,6 @@
from sage.libs.arb.arb cimport arb_t, arb_struct
--- src/sage/libs/arb/acb.pxd.orig 2016-08-08 14:02:11.176595456 -0400
+++ src/sage/libs/arb/acb.pxd 2016-08-08 14:02:17.514595699 -0400
@@ -3,7 +3,7 @@
from sage.libs.arb.types cimport *
from sage.libs.flint.types cimport fmpz_t, fmpq_t
-cdef extern from "acb.h":
+cdef extern from "arb/acb.h":
ctypedef struct acb_struct:
arb_struct real
arb_struct imag
arb_t acb_realref(acb_t x)
arb_t acb_imagref(acb_t x)
diff -up src/sage/libs/arb/arb.pxd.orig src/sage/libs/arb/arb.pxd
--- src/sage/libs/arb/arb.pxd.orig 2015-11-03 18:53:11.959602441 -0200
+++ src/sage/libs/arb/arb.pxd 2015-11-03 18:53:20.641602774 -0200
@@ -3,7 +3,7 @@ from sage.libs.arb.mag cimport mag_t
--- src/sage/libs/arb/arb.pxd.orig 2016-08-08 14:02:26.528596044 -0400
+++ src/sage/libs/arb/arb.pxd 2016-08-08 14:02:33.554596313 -0400
@@ -4,7 +4,7 @@ from sage.libs.arb.types cimport *
from sage.libs.flint.types cimport fmpz_t, fmpq_t
from sage.libs.mpfr cimport mpfr_t
-cdef extern from "arb.h":
+cdef extern from "arb/arb.h":
ctypedef struct arb_struct:
pass
arf_t arb_midref(arb_t x)
mag_t arb_radref(arb_t x)
diff -up src/sage/libs/arb/arf.pxd.orig src/sage/libs/arb/arf.pxd
--- src/sage/libs/arb/arf.pxd.orig 2015-11-03 18:53:33.240603256 -0200
+++ src/sage/libs/arb/arf.pxd 2015-11-03 18:53:39.569603498 -0200
@@ -3,7 +3,7 @@ from sage.libs.gmp.types cimport mpz_t
--- src/sage/libs/arb/arf.pxd.orig 2016-08-08 14:02:45.928596787 -0400
+++ src/sage/libs/arb/arf.pxd 2016-08-08 14:02:53.194597065 -0400
@@ -5,7 +5,7 @@ from sage.libs.gmp.types cimport mpz_t
from sage.libs.flint.types cimport fmpz_t
from sage.libs.mpfr cimport mpfr_t, mpfr_rnd_t
-cdef extern from "arf.h":
+cdef extern from "arb/arf.h":
ctypedef struct arf_struct:
pass
ctypedef arf_struct arf_t[1]
void arf_init(arf_t x)
void arf_clear(arf_t x)
void arf_zero(arf_t x)
diff -up src/sage/libs/arb/mag.pxd.orig src/sage/libs/arb/mag.pxd
--- src/sage/libs/arb/mag.pxd.orig 2015-11-03 18:52:18.254600385 -0200
+++ src/sage/libs/arb/mag.pxd 2015-11-03 18:52:31.009600873 -0200
@@ -1,6 +1,6 @@
--- src/sage/libs/arb/mag.pxd.orig 2016-08-08 14:03:03.208597449 -0400
+++ src/sage/libs/arb/mag.pxd 2016-08-08 14:03:10.010597709 -0400
@@ -3,7 +3,7 @@
from sage.libs.arb.types cimport *
from sage.libs.flint.types cimport fmpz_t, fmpq_t
-cdef extern from "mag.h":
+cdef extern from "arb/mag.h":
ctypedef struct mag_struct:
pass
ctypedef mag_struct mag_t[1]
void mag_init(mag_t x)
void mag_clear(mag_t x)
void mag_init_set(mag_t x, const mag_t y)
diff -up src/sage/libs/arb/acb_hypgeom.pxd.orig src/sage/libs/arb/acb_hypgeom.pxd
--- src/sage/libs/arb/acb_hypgeom.pxd.orig 2016-08-09 14:18:12.798626773 -0400
+++ src/sage/libs/arb/acb_hypgeom.pxd 2016-08-09 14:18:18.591626994 -0400
@@ -2,7 +2,7 @@
from sage.libs.arb.types cimport *
-cdef extern from "acb_hypgeom.h":
+cdef extern from "arb/acb_hypgeom.h":
void acb_hypgeom_pfq_bound_factor(mag_t C, acb_srcptr a, long p, acb_srcptr b, long q, const acb_t z, unsigned long n)
long acb_hypgeom_pfq_choose_n(acb_srcptr a, long p, acb_srcptr b, long q, const acb_t z, long prec)
void acb_hypgeom_pfq_sum_forward(acb_t s, acb_t t, acb_srcptr a, long p, acb_srcptr b, long q, const acb_t z, long n, long prec)
diff -up src/sage/libs/arb/acb_mat.pxd.orig src/sage/libs/arb/acb_mat.pxd
--- src/sage/libs/arb/acb_mat.pxd.orig 2016-08-09 14:18:29.126627398 -0400
+++ src/sage/libs/arb/acb_mat.pxd 2016-08-09 14:18:33.559627568 -0400
@@ -1,6 +1,6 @@
from sage.libs.arb.types cimport acb_t, acb_mat_t
-cdef extern from "acb_mat.h":
+cdef extern from "arb/acb_mat.h":
unsigned int acb_mat_nrows(acb_mat_t mat)
unsigned int acb_mat_ncols(acb_mat_t mat)
acb_t acb_mat_entry(acb_mat_t mat, unsigned long i, unsigned long j)
diff -up src/sage/libs/arb/acb_modular.pxd.orig src/sage/libs/arb/acb_modular.pxd
--- src/sage/libs/arb/acb_modular.pxd.orig 2016-08-09 14:18:42.526627911 -0400
+++ src/sage/libs/arb/acb_modular.pxd 2016-08-09 14:18:46.191628051 -0400
@@ -3,7 +3,7 @@
from sage.libs.arb.types cimport *
from sage.libs.flint.types cimport fmpz_poly_t
-cdef extern from "acb_modular.h":
+cdef extern from "arb/acb_modular.h":
void acb_modular_theta(acb_t theta1, acb_t theta2, acb_t theta3, acb_t theta4, const acb_t z, const acb_t tau, long prec)
void acb_modular_j(acb_t z, const acb_t tau, long prec)
void acb_modular_eta(acb_t z, const acb_t tau, long prec)
diff -up src/sage/libs/arb/bernoulli.pxd.orig src/sage/libs/arb/bernoulli.pxd
--- src/sage/libs/arb/bernoulli.pxd.orig 2016-08-09 14:19:29.102629695 -0400
+++ src/sage/libs/arb/bernoulli.pxd 2016-08-09 14:19:33.495629863 -0400
@@ -2,5 +2,5 @@
from ..flint.types cimport fmpq_t, ulong
-cdef extern from "bernoulli.h":
+cdef extern from "arb/bernoulli.h":
void bernoulli_fmpq_ui(fmpq_t b, ulong n)

55
sagemath-atlas.patch Normal file
View file

@ -0,0 +1,55 @@
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'
import pkgconfig
# CBLAS can be one of multiple implementations
-cblas_pc = pkgconfig.parse('cblas')
+cblas_pc = pkgconfig.parse('atlas')
cblas_libs = list(cblas_pc['libraries'])
cblas_library_dirs = list(cblas_pc['library_dirs'])
cblas_include_dirs = list(cblas_pc['include_dirs'])
-# TODO: Remove Cygwin hack by installing a suitable cblas.pc
-if os.path.exists('/usr/lib/libblas.dll.a'):
- cblas_libs = ['gslcblas']
-
-# LAPACK can be one of multiple implementations
-lapack_pc = pkgconfig.parse('lapack')
-lapack_libs = list(lapack_pc['libraries'])
-lapack_library_dirs = list(lapack_pc['library_dirs'])
-lapack_include_dirs = list(lapack_pc['include_dirs'])
+lapack_libs = [ 'lapack' ]
+lapack_library_dirs = []
+lapack_include_dirs = [ SAGE_INC + '/lapack' ]
# GNU Scientific Library
# Note we replace the built-in gslcblas with the above cblas
gsl_pc = pkgconfig.parse('gsl')
gsl_libs = list(gsl_pc['libraries'].difference(['gslcblas']).union(cblas_libs))
-gsl_library_dirs = list(gsl_pc['library_dirs'])
+gsl_library_dirs = list(cblas_pc['library_dirs'])
gsl_include_dirs = list(gsl_pc['include_dirs'])
# GD image library
diff -up src/sage/misc/cython.py.orig src/sage/misc/cython.py
--- src/sage/misc/cython.py.orig 2016-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
# CBLAS can be one of multiple implementations
-cblas_pc = pkgconfig.parse('cblas')
+cblas_pc = pkgconfig.parse('atlas')
cblas_libs = list(cblas_pc['libraries'])
cblas_library_dirs = list(cblas_pc['library_dirs'])
cblas_include_dirs = list(cblas_pc['include_dirs'])
-# TODO: Remove Cygwin hack by installing a suitable cblas.pc
-if os.path.exists('/usr/lib/libblas.dll.a'):
- cblas_libs = 'gslcblas'
-
standard_libs = [
'mpfr', 'gmp', 'gmpxx', 'stdc++', 'pari', 'm',
'ec', 'gsl',

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 2015-11-06 10:36:17.498631801 -0200
+++ src/sage/numerical/backends/coin_backend.pyx 2015-11-06 10:36:40.210632670 -0200
@@ -761,8 +761,8 @@ cdef class CoinBackend(GenericBackend):
--- 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):
model.setLogLevel(old_logLevel)
# multithreading

View file

@ -1,23 +1,30 @@
diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py
--- src/sage/databases/cremona.py.orig 2015-10-11 17:50:01.241797048 -0300
+++ src/sage/databases/cremona.py 2015-10-11 17:52:06.533801845 -0300
@@ -827,14 +827,9 @@ class MiniCremonaDatabase(SQLDatabase):
--- 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
@@ -53,7 +53,6 @@ from sage.misc.prandom import randint
import sage.schemes.elliptic_curves.constructor as elliptic
from .sql_db import SQLDatabase, verify_column
-from sage.misc.package import is_package_installed
from sage.env import SAGE_SHARE
from sage.misc.all import walltime
@@ -828,14 +827,6 @@ class MiniCremonaDatabase(SQLDatabase):
if N < self.largest_conductor():
message = "There is no elliptic curve with label " + label \
+ " in the database"
- elif is_package_installed('database_cremona_ellcurve'):
- message = "There is no elliptic curve with label " + label \
- + " in the currently available databases"
else:
message = "There is no elliptic curve with label " \
- else:
- message = "There is no elliptic curve with label " \
- + label + " in the default database; try installing " \
- + "the optional package database_cremona_ellcurve which " \
- + "contains the complete Cremona database"
+ + label + " in the default database"
raise ValueError(message)
ainvs = eval(c[0])
data = {'cremona_label': label,
@@ -1676,10 +1671,12 @@ def CremonaDatabase(name=None,mini=None,
@@ -1677,10 +1668,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 2015-11-02 18:12:21.186706786 -0200
+++ src/module_list.py 2015-11-02 18:12:48.252707822 -0200
@@ -116,7 +116,6 @@ library_order["stdc++"] = 1000
--- 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
###
#############################################################
@ -9,7 +9,7 @@ diff -up src/module_list.py.orig src/module_list.py
UNAME = os.uname()
def uname_specific(name, value, alternative):
@@ -338,21 +337,21 @@ ext_modules = [
@@ -378,21 +377,21 @@ ext_modules = [
libraries = ['flint'],
extra_compile_args = ['-std=c99']),
@ -46,7 +46,22 @@ diff -up src/module_list.py.orig src/module_list.py
Extension('sage.graphs.planarity',
sources = ['sage/graphs/planarity.pyx'],
@@ -504,19 +503,19 @@ ext_modules = [
@@ -411,10 +410,10 @@ ext_modules = [
Extension('sage.graphs.graph_decompositions.cutwidth',
sources = ['sage/graphs/graph_decompositions/cutwidth.pyx']),
- OptionalExtension('sage.graphs.graph_decompositions.tdlib',
- sources = ['sage/graphs/graph_decompositions/tdlib.pyx'],
- language="c++",
- package = 'tdlib'),
+# Extension('sage.graphs.graph_decompositions.tdlib',
+# sources = ['sage/graphs/graph_decompositions/tdlib.pyx'],
+# language="c++",
+# package = 'tdlib'),
Extension('sage.graphs.spanning_tree',
sources = ['sage/graphs/spanning_tree.pyx']),
@@ -553,18 +552,18 @@ ext_modules = [
##
################################
@ -65,15 +80,56 @@ diff -up src/module_list.py.orig src/module_list.py
Extension('sage.libs.ecl',
sources = ["sage/libs/ecl.pyx"],
libraries = ["ecl"],
depends = [SAGE_INC + '/ecl/ecl.h']),
libraries = ["ecl"]),
- OptionalExtension("sage.libs.fes",
+ Extension("sage.libs.fes",
["sage/libs/fes.pyx"],
language = "c",
libraries = ['fes'],
@@ -988,13 +987,6 @@ ext_modules = [
@@ -597,17 +596,17 @@ ext_modules = [
Extension('sage.libs.gmp.rational_reconstruction',
sources = ['sage/libs/gmp/rational_reconstruction.pyx']),
- OptionalExtension('sage.libs.braiding',
- sources = ["sage/libs/braiding.pyx"],
- libraries = ["braiding"],
- package="libbraiding",
- language = 'c++'),
+# Extension('sage.libs.braiding',
+# sources = ["sage/libs/braiding.pyx"],
+# libraries = ["braiding"],
+# package="libbraiding",
+# language = 'c++'),
- OptionalExtension('sage.libs.homfly',
- sources = ["sage/libs/homfly.pyx"],
- libraries = ["homfly", "gc"],
- package="libhomfly"),
+# Extension('sage.libs.homfly',
+# sources = ["sage/libs/homfly.pyx"],
+# libraries = ["homfly", "gc"],
+# package="libhomfly"),
Extension('sage.libs.linbox.linbox',
sources = ['sage/libs/linbox/linbox.pyx'],
@@ -989,10 +988,10 @@ ext_modules = [
Extension('sage.matrix.matrix_window',
sources = ['sage/matrix/matrix_window.pyx']),
- OptionalExtension("sage.matrix.matrix_gfpn_dense",
- sources = ['sage/matrix/matrix_gfpn_dense.pyx'],
- libraries = ['mtx'],
- package = 'meataxe'),
+# Extension("sage.matrix.matrix_gfpn_dense",
+# sources = ['sage/matrix/matrix_gfpn_dense.pyx'],
+# libraries = ['mtx'],
+# package = 'meataxe'),
Extension('sage.matrix.misc',
sources = ['sage/matrix/misc.pyx'],
@@ -1025,12 +1024,6 @@ ext_modules = [
Extension('*', ['sage/misc/*.pyx']),
@ -81,15 +137,14 @@ diff -up src/module_list.py.orig src/module_list.py
- OptionalExtension('sage.misc.darwin_utilities',
- sources = ['sage/misc/darwin_memory_usage.c',
- 'sage/misc/darwin_utilities.pyx'],
- depends = ['sage/misc/darwin_memory_usage.h'],
- condition = (UNAME[0] == "Darwin" and not UNAME[2].startswith('8.'))),
-
################################
##
## sage.modular
@@ -1122,19 +1114,7 @@ ext_modules = [
language = 'c++',
libraries=["gmp", "glpk", "z"]),
@@ -1173,19 +1166,19 @@ ext_modules = [
Extension("sage.numerical.backends.interactivelp_backend",
["sage/numerical/backends/interactivelp_backend.pyx"]),
- OptionalExtension("sage.numerical.backends.gurobi_backend",
- ["sage/numerical/backends/gurobi_backend.pyx"],
@ -102,44 +157,38 @@ diff -up src/module_list.py.orig src/module_list.py
- libraries = ["stdc++", "cplex"],
- condition = os.path.isfile(SAGE_INC + "/cplex.h") and
- os.path.isfile(SAGE_LOCAL + "/lib/libcplex.a")),
-
+# Extension("sage.numerical.backends.gurobi_backend",
+# ["sage/numerical/backends/gurobi_backend.pyx"],
+# libraries = ["stdc++", "gurobi"],
+# condition = os.path.isfile(SAGE_INC + "/gurobi_c.h") and
+# os.path.isfile(SAGE_LOCAL + "/lib/libgurobi.so")),
+
+# Extension("sage.numerical.backends.cplex_backend",
+# ["sage/numerical/backends/cplex_backend.pyx"],
+# libraries = ["stdc++", "cplex"],
+# condition = os.path.isfile(SAGE_INC + "/cplex.h") and
+# os.path.isfile(SAGE_LOCAL + "/lib/libcplex.a")),
- OptionalExtension("sage.numerical.backends.coin_backend",
+ Extension("sage.numerical.backends.coin_backend",
["sage/numerical/backends/coin_backend.pyx"],
language = 'c++',
libraries = ["Cbc", "CbcSolver", "Cgl", "Clp", "CoinUtils", "OsiCbc", "OsiClp", "Osi", "lapack"],
@@ -1234,7 +1214,7 @@ ext_modules = [
libraries=['ntl'],
language = 'c++'),
- OptionalExtension("sage.rings.complex_ball_acb",
+ Extension("sage.rings.complex_ball_acb",
["sage/rings/complex_ball_acb.pyx"],
libraries=['arb', 'mpfi', 'mpfr'],
include_dirs=[SAGE_INC + '/flint'],
@@ -1307,7 +1287,7 @@ ext_modules = [
Extension('sage.rings.real_interval_absolute',
sources = ['sage/rings/real_interval_absolute.pyx']),
- OptionalExtension("sage.rings.real_arb",
+ Extension("sage.rings.real_arb",
["sage/rings/real_arb.pyx"],
libraries = ['arb', 'mpfi', 'mpfr'],
include_dirs = [SAGE_INC + '/flint'],
@@ -1602,14 +1582,14 @@ ext_modules = [
libraries = ["Cbc", "CbcSolver", "Cgl", "Clp", "CoinUtils",
@@ -1677,7 +1670,7 @@ ext_modules = [
##
################################
- OptionalExtension("sage.sat.solvers.cryptominisat.cryptominisat",
+ Extension("sage.sat.solvers.cryptominisat.cryptominisat",
sources = ["sage/sat/solvers/cryptominisat/cryptominisat.pyx"],
include_dirs = [os.path.join(SAGE_INC, "cmsat")],
include_dirs = [os.path.join(SAGE_INC, "cmsat")] + zlib_include_dirs,
language = "c++",
libraries = ['cryptominisat', 'z'],
@@ -1685,7 +1678,7 @@ ext_modules = [
library_dirs = zlib_library_dirs,
package = 'cryptominisat'),
- OptionalExtension("sage.sat.solvers.cryptominisat.solverconf",
+ Extension("sage.sat.solvers.cryptominisat.solverconf",
sources = ["sage/sat/solvers/cryptominisat/solverconf.pyx", "sage/sat/solvers/cryptominisat/solverconf_helper.cpp"],
include_dirs = [os.path.join(SAGE_INC, "cmsat")],
language = "c++",
sources = ["sage/sat/solvers/cryptominisat/solverconf.pyx",
"sage/sat/solvers/cryptominisat/solverconf_helper.cpp"],
include_dirs = [os.path.join(SAGE_INC, "cmsat")] + zlib_include_dirs,

View file

@ -1,8 +1,8 @@
diff -up src/sage/libs/fes.pyx.orig src/sage/libs/fes.pyx
--- src/sage/libs/fes.pyx.orig 2015-11-29 16:53:45.203478795 -0200
+++ src/sage/libs/fes.pyx 2015-11-29 16:54:23.318480255 -0200
@@ -89,8 +89,8 @@ from sage.rings.polynomial.pbori import
from sage.rings.arith import binomial
--- src/sage/libs/fes.pyx.orig 2016-08-08 13:44:21.919554511 -0400
+++ src/sage/libs/fes.pyx 2016-08-08 13:44:36.618555074 -0400
@@ -90,8 +90,8 @@ from sage.rings.polynomial.pbori import
from sage.arith.all import binomial
from sage.combinat.subset import Subsets
-from sage.matrix.all import *

View file

@ -1,9 +1,9 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2015-10-11 18:08:06.689838613 -0300
+++ src/module_list.py 2015-10-11 18:08:21.686839187 -0300
@@ -515,11 +515,11 @@ ext_modules = [
libraries = ["ecl"],
depends = [SAGE_INC + '/ecl/ecl.h']),
--- 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 = [
sources = ["sage/libs/ecl.pyx"],
libraries = ["ecl"]),
- Extension("sage.libs.fes",
- ["sage/libs/fes.pyx"],

View file

@ -1,7 +1,7 @@
diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/permgroup.py
--- src/sage/groups/perm_gps/permgroup.py.orig 2015-07-26 07:34:43.000000000 -0600
+++ src/sage/groups/perm_gps/permgroup.py 2016-08-11 21:51:51.490143121 -0600
@@ -136,7 +136,6 @@ from sage.groups.perm_gps.permgroup_elem
--- src/sage/groups/perm_gps/permgroup.py.orig 2016-08-08 13:39:39.617543700 -0400
+++ src/sage/groups/perm_gps/permgroup.py 2016-08-08 13:40:16.291545105 -0400
@@ -145,7 +145,6 @@ from sage.groups.perm_gps.permgroup_elem
from sage.groups.abelian_gps.abelian_group import AbelianGroup
from sage.misc.cachefunc import cached_method
from sage.groups.class_function import ClassFunction
@ -9,55 +9,45 @@ diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/per
from sage.sets.finite_enumerated_set import FiniteEnumeratedSet
from sage.categories.all import FiniteEnumeratedSets
from sage.groups.conjugacy_classes import ConjugacyClassGAP
@@ -155,7 +154,10 @@ def load_hap():
try:
gap.load_package("hap")
except Exception:
- gap.load_package("hap")
+ try:
+ gap.load_package("hap")
+ except Exception:
+ raise RuntimeError("gap-hap package failed to load.")
def hap_decorator(f):
"""
@@ -181,8 +183,6 @@ def hap_decorator(f):
@@ -190,8 +189,7 @@ def hap_decorator(f):
"""
@wraps(f)
def wrapped(self, n, p=0):
- if not is_package_installed('gap_packages'):
- raise RuntimeError("You must install the optional gap_packages package.")
+ raise RuntimeError("You must install the optional gap_packages package.")
load_hap()
from sage.rings.arith import is_prime
from sage.arith.all import is_prime
if not (p == 0 or is_prime(p)):
@@ -1617,9 +1617,7 @@ class PermutationGroup_generic(group.Fin
@@ -1683,9 +1681,7 @@ class PermutationGroup_generic(group.Fin
try:
return [Integer(n) for n in self._gap_().IdGroup()]
except RuntimeError:
- if not is_package_installed('database_gap'):
- raise RuntimeError("You must install the optional database_gap package first.")
- raise
+ raise RuntimeError("gap-hap package error.")
+ raise RuntimeError("You must install the optional database_gap package first.")
def id(self):
"""
@@ -1670,9 +1668,7 @@ class PermutationGroup_generic(group.Fin
@@ -1736,9 +1732,7 @@ class PermutationGroup_generic(group.Fin
try:
return Integer(self._gap_().PrimitiveIdentification())
except RuntimeError:
- if not is_package_installed('database_gap'):
- raise RuntimeError("You must install the optional database_gap package first.")
- raise
+ raise RuntimeError("gap-hap package error.")
+ raise RuntimeError("You must install the optional database_gap package first.")
def center(self):
"""
@@ -3959,8 +3955,6 @@ class PermutationGroup_generic(group.Fin
@@ -4114,8 +4108,7 @@ class PermutationGroup_generic(group.Fin
- David Joyner and Graham Ellis
"""
- if not is_package_installed('gap_packages'):
- raise RuntimeError("You must install the optional gap_packages package.")
+ raise RuntimeError("You must install the optional gap_packages package.")
load_hap()
from sage.rings.arith import is_prime
from sage.arith.all import is_prime
if not (p == 0 or is_prime(p)):

30
sagemath-gcc6.patch Normal file
View file

@ -0,0 +1,30 @@
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 = [
library_dirs = m4ri_library_dirs,
include_dirs = m4ri_include_dirs,
depends = [SAGE_INC + "/m4rie/m4rie.h"],
- extra_compile_args = ['-std=c99'] + m4ri_extra_compile_args),
+ extra_compile_args = ['-std=c++11'] + m4ri_extra_compile_args),
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'] + ['-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_XPG6", "-DDISABLE_COMMENTATOR"]
+ m4ri_extra_compile_args + givaro_extra_compile_args),
Extension('sage.matrix.matrix_modn_sparse',

View file

@ -1,7 +1,7 @@
diff -up src/sage/modular/arithgroup/farey.cpp.orig src/sage/modular/arithgroup/farey.cpp
--- src/sage/modular/arithgroup/farey.cpp.orig 2015-10-11 17:20:15.809728677 -0300
+++ src/sage/modular/arithgroup/farey.cpp 2015-10-11 17:20:28.178729151 -0300
@@ -136,6 +136,7 @@ operator*(const SL2Z& M, const vector<mp
--- src/sage/modular/arithgroup/farey.cpp.orig 2016-08-08 13:04:25.463462742 -0400
+++ src/sage/modular/arithgroup/farey.cpp 2016-08-08 13:04:47.129463572 -0400
@@ -142,6 +142,7 @@ operator*(const SL2Z& M, const vector<mp
return result;
}
@ -9,7 +9,7 @@ diff -up src/sage/modular/arithgroup/farey.cpp.orig src/sage/modular/arithgroup/
inline
mpz_class
floor(const mpq_class r) {
@@ -146,6 +147,7 @@ floor(const mpq_class r) {
@@ -152,6 +153,7 @@ floor(const mpq_class r) {
return result - 1;
}
}

182
sagemath-includes.patch Normal file
View file

@ -0,0 +1,182 @@
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:
#########################################################
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 = [
Extension('sage.algebras.letterplace.free_algebra_letterplace',
sources = ['sage/algebras/letterplace/free_algebra_letterplace.pyx'],
libraries = singular_libs,
+ include_dirs = singular_incs,
language="c++"),
Extension('sage.algebras.letterplace.free_algebra_element_letterplace',
sources = ['sage/algebras/letterplace/free_algebra_element_letterplace.pyx'],
libraries = singular_libs,
+ include_dirs = singular_incs,
language="c++"),
Extension('sage.algebras.letterplace.letterplace_ideal',
sources = ['sage/algebras/letterplace/letterplace_ideal.pyx'],
libraries = singular_libs,
+ include_dirs = singular_incs,
language="c++"),
Extension('sage.algebras.quatalg.quaternion_algebra_cython',
@@ -632,7 +636,8 @@ ext_modules = [
[])),
Extension('sage.libs.lrcalc.lrcalc',
- sources = ["sage/libs/lrcalc/lrcalc.pyx"]),
+ sources = ["sage/libs/lrcalc/lrcalc.pyx"],
+ include_dirs = [os.path.join(SAGE_INC, 'lrcalc')]),
Extension('sage.libs.pari.closure',
sources = ["sage/libs/pari/closure.pyx"]),
@@ -665,33 +670,39 @@ ext_modules = [
Extension('sage.libs.singular.singular',
sources = ['sage/libs/singular/singular.pyx'],
libraries = ['givaro'] + singular_libs,
+ include_dirs = singular_incs,
language="c++",
extra_compile_args = givaro_extra_compile_args),
Extension('sage.libs.singular.polynomial',
sources = ['sage/libs/singular/polynomial.pyx'],
libraries = singular_libs,
+ include_dirs = singular_incs,
language="c++"),
Extension('sage.libs.singular.ring',
sources = ['sage/libs/singular/ring.pyx'],
libraries = singular_libs,
+ include_dirs = singular_incs,
language="c++"),
Extension('sage.libs.singular.groebner_strategy',
sources = ['sage/libs/singular/groebner_strategy.pyx'],
libraries = singular_libs,
+ include_dirs = singular_incs,
language="c++"),
Extension('sage.libs.singular.function',
sources = ['sage/libs/singular/function.pyx'],
libraries = singular_libs,
+ include_dirs = singular_incs,
language="c++",
extra_compile_args = givaro_extra_compile_args),
Extension('sage.libs.singular.option',
sources = ['sage/libs/singular/option.pyx'],
libraries = singular_libs,
+ include_dirs = singular_incs,
language="c++"),
Extension('sage.libs.symmetrica.symmetrica',
@@ -700,17 +711,21 @@ ext_modules = [
Extension('sage.libs.mpmath.utils',
sources = ["sage/libs/mpmath/utils.pyx"],
- libraries = ['mpfr']),
+ libraries = ['mpfr'],
+ include_dirs = [os.path.join(SAGE_INC, "flint")]),
Extension('sage.libs.mpmath.ext_impl',
sources = ["sage/libs/mpmath/ext_impl.pyx"],
- libraries = ['mpfr']),
+ libraries = ['mpfr'],
+ include_dirs = [os.path.join(SAGE_INC, "flint")]),
Extension('sage.libs.mpmath.ext_main',
- sources = ["sage/libs/mpmath/ext_main.pyx"]),
+ sources = ["sage/libs/mpmath/ext_main.pyx"],
+ include_dirs = [os.path.join(SAGE_INC, "flint")]),
Extension('sage.libs.mpmath.ext_libmp',
- sources = ["sage/libs/mpmath/ext_libmp.pyx"]),
+ sources = ["sage/libs/mpmath/ext_libmp.pyx"],
+ include_dirs = [os.path.join(SAGE_INC, "flint")]),
###################################
##
@@ -718,7 +733,8 @@ ext_modules = [
##
###################################
- Extension('*', ["sage/libs/arb/*.pyx"]),
+ Extension('*', ["sage/libs/arb/*.pyx"],
+ include_dirs = [SAGE_INC + '/flint', SAGE_INC + '/arb']),
###################################
##
@@ -891,7 +907,7 @@ ext_modules = [
Extension("sage.matrix.matrix_complex_ball_dense",
["sage/matrix/matrix_complex_ball_dense.pyx"],
libraries=['arb', 'mpfi', 'mpfr'],
- include_dirs=[SAGE_INC + '/flint'],
+ include_dirs=[SAGE_INC + '/flint', SAGE_INC + '/arb'],
language = "c++"),
Extension('sage.matrix.matrix_complex_double_dense',
@@ -963,6 +979,7 @@ ext_modules = [
Extension('sage.matrix.matrix_mpolynomial_dense',
sources = ['sage/matrix/matrix_mpolynomial_dense.pyx'],
libraries = singular_libs,
+ include_dirs = singular_incs,
language="c++"),
Extension('sage.matrix.matrix_rational_dense',
@@ -1284,6 +1301,7 @@ ext_modules = [
Extension("sage.rings.complex_arb",
["sage/rings/complex_arb.pyx"],
libraries=['mpfi', 'mpfr', 'gmp'],
+ include_dirs=[SAGE_INC + '/flint', SAGE_INC + '/arb'],
language = 'c++'),
Extension('sage.rings.complex_double',
@@ -1356,6 +1374,7 @@ ext_modules = [
Extension("sage.rings.real_arb",
["sage/rings/real_arb.pyx"],
libraries = ['mpfi', 'mpfr'],
+ include_dirs=[SAGE_INC + '/flint', SAGE_INC + '/arb'],
language = 'c++'),
Extension('sage.rings.real_lazy',
@@ -1562,17 +1581,20 @@ ext_modules = [
Extension('sage.rings.polynomial.multi_polynomial_ideal_libsingular',
sources = ['sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx'],
libraries = singular_libs,
+ include_dirs = singular_incs,
language="c++"),
Extension('sage.rings.polynomial.plural',
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),
Extension('sage.rings.polynomial.multi_polynomial_libsingular',
sources = ['sage/rings/polynomial/multi_polynomial_libsingular.pyx'],
libraries = singular_libs,
+ include_dirs = singular_incs,
language="c++"),
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:
# search for dependencies and add to gcc -I<path>
include_dirs = sage_include_directories(use_sources=True)
+include_dirs.extend(['@@CYSIGNALS@@'])
# Manually add -fno-strict-aliasing, which is needed to compile Cython
# and disappears from the default flags if the user has set CFLAGS.

1696
sagemath-ipython3.patch Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,365 @@
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,8 +1,8 @@
diff -up src/sage/interfaces/jmoldata.py.orig src/sage/interfaces/jmoldata.py
--- src/sage/interfaces/jmoldata.py.orig 2015-10-11 17:48:03.194792527 -0300
+++ src/sage/interfaces/jmoldata.py 2015-10-11 17:48:39.748793927 -0300
@@ -146,8 +146,6 @@ class JmolData(SageObject):
sage: print os.path.exists(testfile) # optional -- java
--- src/sage/interfaces/jmoldata.py.orig 2016-08-08 13:34:51.199532656 -0400
+++ src/sage/interfaces/jmoldata.py 2016-08-08 13:36:16.474535921 -0400
@@ -147,8 +147,6 @@ class JmolData(SageObject):
sage: print(os.path.exists(testfile)) # optional -- java
True
"""
- # Set up paths, file names and scripts
@ -10,7 +10,7 @@ diff -up src/sage/interfaces/jmoldata.py.orig src/sage/interfaces/jmoldata.py
target_native = targetfile
import sys
if sys.platform == 'cygwin':
@@ -172,10 +170,8 @@ class JmolData(SageObject):
@@ -173,10 +171,8 @@ class JmolData(SageObject):
env = dict(os.environ)
env['LC_ALL'] = 'C'
env['LANG'] = 'C'

View file

@ -1,6 +1,6 @@
diff -up src/sage/libs/lcalc/lcalc_sage.h.orig src/sage/libs/lcalc/lcalc_sage.h
--- src/sage/libs/lcalc/lcalc_sage.h.orig 2015-11-02 23:13:05.279397757 -0200
+++ src/sage/libs/lcalc/lcalc_sage.h 2015-11-02 23:13:34.402398872 -0200
--- src/sage/libs/lcalc/lcalc_sage.h.orig 2016-08-08 13:40:43.480546146 -0400
+++ src/sage/libs/lcalc/lcalc_sage.h 2016-08-08 13:40:49.561546379 -0400
@@ -1,4 +1,4 @@
-#include "libLfunction/L.h"
+#include "Lfunction/L.h"

View file

@ -1,7 +1,19 @@
diff -up src/sage/libs/gap/test/main.c.orig src/sage/libs/gap/test/main.c
--- src/sage/libs/gap/test/main.c.orig 2016-08-08 13:43:32.376552613 -0400
+++ src/sage/libs/gap/test/main.c 2016-08-08 13:43:38.209552837 -0400
@@ -22,7 +22,7 @@ void eval(char* cmd) {
libgap_start_interaction(cmd);
libgap_enter();
- libGAP_ReadEvalCommand(libGAP_BottomLVars);
+ libGAP_ReadEvalCommand(libGAP_BottomLVars, NULL);
libGAP_ViewObjHandler(libGAP_ReadEvalResult);
char* out = libgap_get_output();
libgap_exit();
diff -up src/sage/libs/gap/util.pyx.orig src/sage/libs/gap/util.pyx
--- src/sage/libs/gap/util.pyx.orig 2015-07-26 07:34:43.000000000 -0600
+++ src/sage/libs/gap/util.pyx 2016-04-07 17:49:52.497518812 -0600
@@ -153,18 +153,9 @@ def gap_root():
--- src/sage/libs/gap/util.pyx.orig 2016-08-08 13:41:46.176548547 -0400
+++ src/sage/libs/gap/util.pyx 2016-08-08 13:42:26.594550094 -0400
@@ -154,18 +154,9 @@ def gap_root():
sage: from sage.libs.gap.util import gap_root
sage: gap_root() # random output
@ -12,7 +24,7 @@ diff -up src/sage/libs/gap/util.pyx.orig src/sage/libs/gap/util.pyx
- gapdir = os.path.join(SAGE_LOCAL, 'gap', 'latest')
- if os.path.exists(gapdir):
- return gapdir
- print 'The gap-4.5.5.spkg (or later) seems to be not installed!'
- print('The gap-4.5.5.spkg (or later) seems to be not installed!')
- gap_sh = open(os.path.join(SAGE_LOCAL, 'bin', 'gap')).read().splitlines()
- gapdir = filter(lambda dir:dir.strip().startswith('GAP_DIR'), gap_sh)[0]
- gapdir = gapdir.split('"')[1]
@ -22,45 +34,3 @@ diff -up src/sage/libs/gap/util.pyx.orig src/sage/libs/gap/util.pyx
cdef initialize():
@@ -280,7 +271,7 @@ cdef libGAP_Obj gap_eval(str gap_string)
libgap_start_interaction(cmd)
try:
sig_on()
- status = libGAP_ReadEvalCommand(libGAP_BottomLVars)
+ status = libGAP_ReadEvalCommand(libGAP_BottomLVars, NULL)
if status != libGAP_STATUS_END:
libgap_call_error_handler()
sig_off()
@@ -464,7 +455,7 @@ def command(command_string):
libgap_start_interaction(cmd)
try:
sig_on()
- status = libGAP_ReadEvalCommand(libGAP_BottomLVars)
+ status = libGAP_ReadEvalCommand(libGAP_BottomLVars, NULL)
if status != libGAP_STATUS_END:
libgap_call_error_handler()
sig_off()
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 2015-07-26 07:34:43.000000000 -0600
+++ src/sage/libs/gap/gap_includes.pxd 2016-04-07 17:50:43.958388846 -0600
@@ -131,7 +131,7 @@ cdef extern from "gap/objects.h":
cdef int libGAP_LAST_TESTING_TNUM
cdef extern from "gap/read.h":
- void* libGAP_ReadEvalCommand(libGAP_Obj context)
+ void* libGAP_ReadEvalCommand(libGAP_Obj context, void *dualSemicolon)
void* libGAP_ReadEvalFile()
void* libGAP_ReadEvalResult
bint libGAP_READ_ERROR()
diff -up src/sage/libs/gap/test/main.c.orig src/sage/libs/gap/test/main.c
--- src/sage/libs/gap/test/main.c.orig 2015-07-26 07:34:43.000000000 -0600
+++ src/sage/libs/gap/test/main.c 2016-04-07 17:51:07.339512407 -0600
@@ -22,7 +22,7 @@ void eval(char* cmd) {
libgap_start_interaction(cmd);
libgap_enter();
- libGAP_ReadEvalCommand(libGAP_BottomLVars);
+ libGAP_ReadEvalCommand(libGAP_BottomLVars, NULL);
libGAP_ViewObjHandler(libGAP_ReadEvalResult);
char* out = libgap_get_output();
libgap_exit();

View file

@ -1,7 +1,15 @@
diff -up src/sage/geometry/polyhedron/base.py.orig src/sage/geometry/polyhedron/base.py
--- src/sage/geometry/polyhedron/base.py.orig 2015-10-11 17:54:35.252807540 -0300
+++ src/sage/geometry/polyhedron/base.py 2015-10-11 17:54:41.621807784 -0300
@@ -3371,10 +3371,6 @@ class Polyhedron_base(Element):
--- src/sage/geometry/polyhedron/base.py.orig 2016-08-08 13:38:11.144540312 -0400
+++ src/sage/geometry/polyhedron/base.py 2016-08-08 13:38:26.707540908 -0400
@@ -21,7 +21,6 @@ import six
from sage.structure.element import Element, coerce_binop, is_Vector
from sage.misc.all import cached_method, prod
-from sage.misc.package import is_package_installed
from sage.rings.all import QQ, ZZ
from sage.rings.real_double import RDF
@@ -3691,10 +3690,6 @@ class Polyhedron_base(Element):
David Avis's lrs program.
"""

View file

@ -1,29 +1,28 @@
diff -up src/bin/sage-maxima.lisp.orig src/bin/sage-maxima.lisp
--- src/bin/sage-maxima.lisp.orig 2015-10-11 17:39:58.025773948 -0300
+++ src/bin/sage-maxima.lisp 2015-10-11 17:40:00.218774032 -0300
@@ -3,4 +3,8 @@
;(setf *general-display-prefix* "<sage-display>")
--- src/bin/sage-maxima.lisp.orig 2016-08-08 13:31:41.528525393 -0400
+++ src/bin/sage-maxima.lisp 2016-08-08 13:31:54.865525903 -0400
@@ -4,3 +4,8 @@
(setf *prompt-prefix* "<sage-display>")
-
+#+clisp
+(setf
+ *error-output* (open "/dev/stderr" :direction :output)
+ *standard-input* (open "/dev/stdin" :direction :input)
+ *standard-output* (open "/dev/stdout" :direction :output))
diff -up src/sage/interfaces/maxima.py.orig src/sage/interfaces/maxima.py
--- src/sage/interfaces/maxima.py.orig 2015-10-11 17:39:41.677773322 -0300
+++ src/sage/interfaces/maxima.py 2015-10-11 17:40:00.219774032 -0300
@@ -552,7 +552,7 @@ class Maxima(MaximaAbstract, Expect):
--- src/sage/interfaces/maxima.py.orig 2016-08-08 13:32:02.623526200 -0400
+++ src/sage/interfaces/maxima.py 2016-08-08 13:32:41.698527697 -0400
@@ -556,7 +556,7 @@ class Maxima(MaximaAbstract, Expect):
Expect.__init__(self,
name = 'maxima',
prompt = '\(\%i[0-9]+\) ',
- command = 'maxima --userdir="%s" -p "%s"'%(SAGE_MAXIMA_DIR,STARTUP),
+ command = 'maxima --disable-readline --userdir="%s" -p "%s"'%(SAGE_MAXIMA_DIR,STARTUP),
maxread = 10000,
script_subdirectory = script_subdirectory,
restart_on_ctrlc = False,
@@ -620,7 +620,8 @@ class Maxima(MaximaAbstract, Expect):
verbose_start = False,
@@ -623,7 +623,8 @@ class Maxima(MaximaAbstract, Expect):
# Remove limit on the max heapsize (since otherwise it defaults
# to 256MB with ECL).

View file

@ -1,10 +1,10 @@
diff -up src/sage/graphs/graph_generators.py.orig src/sage/graphs/graph_generators.py
--- src/sage/graphs/graph_generators.py.orig 2015-07-26 07:34:43.000000000 -0600
+++ src/sage/graphs/graph_generators.py 2016-04-28 21:13:15.214276462 -0600
@@ -841,7 +841,7 @@ class GraphGenerators():
from sage.misc.package import is_package_installed
if not is_package_installed("nauty"):
raise TypeError("the optional nauty package is not installed")
--- src/sage/graphs/graph_generators.py.orig 2016-08-08 13:38:51.824541870 -0400
+++ src/sage/graphs/graph_generators.py 2016-08-08 13:39:20.460542967 -0400
@@ -872,7 +872,7 @@ class GraphGenerators():
>A geng -d0D3 n=4 e=0-6
"""
import subprocess
- sp = subprocess.Popen("geng {0}".format(options), shell=True,
+ sp = subprocess.Popen("nauty-geng {0}".format(options), shell=True,
stdin=subprocess.PIPE, stdout=subprocess.PIPE,

60
sagemath-nofstring.patch Normal file
View file

@ -0,0 +1,60 @@
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
ArithmeticError: The inverse of 6 modulo 10 is not defined.
"""
if l_bound < 2:
- raise ValueError(f"minimum value for lower bound is 2, given: {l_bound}")
+ raise ValueError("minimum value for lower bound is 2, given: {l_bound}")
if u_bound > MAX_MODULUS:
- raise ValueError(f"upper bound cannot be greater than {MAX_MODULUS}, given: {u_bound}")
+ raise ValueError("upper bound cannot be greater than {MAX_MODULUS}, given: {u_bound}")
self._l_bound = l_bound
self._u_bound = u_bound
@@ -232,7 +232,7 @@ cdef class MultiModularBasis_base(object
if check:
for p in plist:
if p > MAX_MODULUS:
- raise OverflowError(f"given modulus {p} is larger than {MAX_MODULUS}")
+ raise OverflowError("given modulus {p} is larger than {MAX_MODULUS}")
self._realloc_to_new_count(self.n + len_plist)
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
@@ -392,7 +392,7 @@ cdef class IntegerMod_abstract(FiniteRin
from integer_mod_ring import IntegerModRing
R = IntegerModRing(modulus)
if (<Element>self)._parent._IntegerModRing_generic__order % R.order():
- raise ArithmeticError(f"reduction modulo {modulus!r} not defined")
+ raise ArithmeticError("reduction modulo {modulus!r} not defined")
return R(self)
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
cdef int init_coerce(self, bint warn=True) except -1:
if self._coerce_from_hash is None:
if warn:
- raise AssertionError(f"unexpected call of init_coerce() for {type(self)}")
+ raise AssertionError("unexpected call of init_coerce() for {type(self)}")
self._initial_coerce_list = []
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)
from sage.misc.all import prod
return prod([SR(p)**e for p,e in x], SR(x.unit()))
else:
- raise TypeError(f"unable to convert {x!r} to a symbolic expression")
+ raise TypeError("unable to convert {x!r} to a symbolic expression")
return new_Expression_from_GEx(self, exp)

View file

@ -1,186 +0,0 @@
diff -up src/sage/rings/bernmm/bernmm-test.cpp.orig src/sage/rings/bernmm/bernmm-test.cpp
--- src/sage/rings/bernmm/bernmm-test.cpp.orig 2015-10-11 18:17:42.808860675 -0300
+++ src/sage/rings/bernmm/bernmm-test.cpp 2015-10-11 18:18:44.684863044 -0300
@@ -70,7 +70,7 @@ void bern_naive(mpq_t* res, long n)
*/
int testcase__bern_modp_powg(long p, long k, mpq_t b)
{
- double pinv = 1 / ((double) p);
+ mulmod_t pinv = PrepMulMod(p);
// compute B_k mod p using _bern_modp_powg()
long x = _bern_modp_powg(p, pinv, k);
@@ -147,7 +147,7 @@ int test__bern_modp_powg()
*/
int testcase__bern_modp_pow2(long p, long k)
{
- double pinv = 1 / ((double) p);
+ mulmod_t pinv = PrepMulMod(p);
if (PowerMod(2, k, p, pinv) == 1)
return 1;
diff -up src/sage/rings/bernmm/bern_modp.cpp.orig src/sage/rings/bernmm/bern_modp.cpp
--- src/sage/rings/bernmm/bern_modp.cpp.orig 2015-10-11 18:17:42.814860675 -0300
+++ src/sage/rings/bernmm/bern_modp.cpp 2015-10-11 18:20:28.077867003 -0300
@@ -43,14 +43,14 @@ namespace bernmm {
pinv = 1 / ((double) p)
g = a multiplicative generator of GF(p), in [0, p)
*/
-long bernsum_powg(long p, double pinv, long k, long g)
+long bernsum_powg(long p, mulmod_t pinv, long k, long g)
{
long half_gm1 = (g + ((g & 1) ? 0 : p) - 1) / 2; // (g-1)/2 mod p
long g_to_jm1 = 1;
long g_to_km1 = PowerMod(g, k-1, p, pinv);
long g_to_km1_to_j = g_to_km1;
long sum = 0;
- double g_pinv = ((double) g) / ((double) p);
+ muldivrem_t g_pinv = PrepMulDivRem(g, p);
mulmod_precon_t g_to_km1_pinv = PrepMulModPrecon(g_to_km1, p, pinv);
for (long j = 1; j <= (p-1)/2; j++)
@@ -224,7 +224,7 @@ public:
#error Number of bits in a long must be divisible by TABLE_LG_SIZE
#endif
-long bernsum_pow2(long p, double pinv, long k, long g, long n)
+long bernsum_pow2(long p, mulmod_t pinv, long k, long g, long n)
{
// In the main summation loop we accumulate data into the _tables_ array;
// tables[y][z] contributes to the final answer with a weight of
@@ -481,7 +481,7 @@ long PrepRedc(long n)
(See bernsum_pow2() for code comments; we only add comments here where
something is different from bernsum_pow2())
*/
-long bernsum_pow2_redc(long p, double pinv, long k, long g, long n)
+long bernsum_pow2_redc(long p, mulmod_t pinv, long k, long g, long n)
{
long pinv2 = PrepRedc(p);
long F = (1L << (ULONG_BITS/2)) % p;
@@ -655,7 +655,7 @@ long bernsum_pow2_redc(long p, double pi
Algorithm: uses bernsum_powg() to compute the main sum.
*/
-long _bern_modp_powg(long p, double pinv, long k)
+long _bern_modp_powg(long p, mulmod_t pinv, long k)
{
Factorisation F(p-1);
long g = primitive_root(p, pinv, F);
@@ -685,7 +685,7 @@ long _bern_modp_powg(long p, double pinv
Algorithm: uses bernsum_pow2() (or bernsum_pow2_redc() if p is small
enough) to compute the main sum.
*/
-long _bern_modp_pow2(long p, double pinv, long k)
+long _bern_modp_pow2(long p, mulmod_t pinv, long k)
{
Factorisation F(p-1);
long g = primitive_root(p, pinv, F);
@@ -765,7 +765,7 @@ long bern_modp(long p, long k)
if (m == 0)
return -1;
- double pinv = 1 / ((double) p);
+ mulmod_t pinv = PrepMulMod(p);
long x = _bern_modp(p, pinv, m); // = B_m/m mod p
return MulMod(x, k, p, pinv);
}
diff -up src/sage/rings/bernmm/bern_modp.h.orig src/sage/rings/bernmm/bern_modp.h
--- src/sage/rings/bernmm/bern_modp.h.orig 2015-10-11 18:17:42.820860675 -0300
+++ src/sage/rings/bernmm/bern_modp.h 2015-10-11 18:20:53.453867975 -0300
@@ -12,6 +12,7 @@
#ifndef BERNMM_BERN_MODP_H
#define BERNMM_BERN_MODP_H
+#include <NTL/ZZ.h>
namespace bernmm {
@@ -29,8 +30,8 @@ long bern_modp(long p, long k);
/*
Exported for testing.
*/
-long _bern_modp_powg(long p, double pinv, long k);
-long _bern_modp_pow2(long p, double pinv, long k);
+long _bern_modp_powg(long p, NTL::mulmod_t pinv, long k);
+long _bern_modp_pow2(long p, NTL::mulmod_t pinv, long k);
};
diff -up src/sage/rings/bernmm/bern_modp_util.cpp.orig src/sage/rings/bernmm/bern_modp_util.cpp
--- src/sage/rings/bernmm/bern_modp_util.cpp.orig 2015-10-11 18:17:42.825860675 -0300
+++ src/sage/rings/bernmm/bern_modp_util.cpp 2015-10-11 18:21:24.653869170 -0300
@@ -20,7 +20,7 @@ NTL_CLIENT;
namespace bernmm {
-long PowerMod(long a, long ee, long n, double ninv)
+long PowerMod(long a, long ee, long n, mulmod_t ninv)
{
long x, y;
@@ -89,7 +89,7 @@ PrimeTable::PrimeTable(long bound)
}
-long order(long x, long p, double pinv, const Factorisation& F)
+long order(long x, long p, mulmod_t pinv, const Factorisation& F)
{
// in the loop below, m is always some multiple of the order of x
long m = p - 1;
@@ -113,7 +113,7 @@ long order(long x, long p, double pinv,
-long primitive_root(long p, double pinv, const Factorisation& F)
+long primitive_root(long p, mulmod_t pinv, const Factorisation& F)
{
if (p == 2)
return 1;
diff -up src/sage/rings/bernmm/bern_modp_util.h.orig src/sage/rings/bernmm/bern_modp_util.h
--- src/sage/rings/bernmm/bern_modp_util.h.orig 2015-10-11 18:17:42.830860676 -0300
+++ src/sage/rings/bernmm/bern_modp_util.h 2015-10-11 18:21:58.044870449 -0300
@@ -17,6 +17,7 @@
#include <vector>
#include <cassert>
#include <climits>
+#include <NTL/ZZ.h>
#if ULONG_MAX == 4294967295U
@@ -39,7 +40,7 @@ namespace bernmm {
(Implementation is adapted from ZZ.c in NTL 5.4.1.)
*/
-long PowerMod(long a, long ee, long n, double ninv);
+long PowerMod(long a, long ee, long n, NTL::mulmod_t ninv);
/*
@@ -123,13 +124,13 @@ long next_prime(long p);
/*
Computes order of x mod p, given the factorisation F of p-1.
*/
-long order(long x, long p, double pinv, const Factorisation& F);
+long order(long x, long p, NTL::mulmod_t pinv, const Factorisation& F);
/*
Finds the smallest primitive root mod p, given the factorisation F of p-1.
*/
-long primitive_root(long p, double pinv, const Factorisation& F);
+long primitive_root(long p, NTL::mulmod_t pinv, const Factorisation& F);
}; // end namespace
diff -up src/sage/rings/bernmm/bern_modp.cpp.orig src/sage/rings/bernmm/bern_modp.cpp
--- src/sage/rings/bernmm/bern_modp.cpp.orig 2015-11-02 23:58:56.669503117 -0200
+++ src/sage/rings/bernmm/bern_modp.cpp 2015-11-02 23:59:15.683503846 -0200
@@ -717,7 +717,7 @@ long _bern_modp_pow2(long p, mulmod_t pi
2 <= k <= p-3, k even
pinv = 1 / ((double) p)
*/
-long _bern_modp(long p, double pinv, long k)
+long _bern_modp(long p, mulmod_t pinv, long k)
{
if (PowerMod(2, k, p, pinv) != 1)
// 2^k != 1 mod p, so we use the faster version

View file

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

View file

@ -1,14 +0,0 @@
diff -up src/sage/libs/polybori/decl.pxd.orig src/sage/libs/polybori/decl.pxd
--- src/sage/libs/polybori/decl.pxd.orig 2015-10-11 18:23:04.338872987 -0300
+++ src/sage/libs/polybori/decl.pxd 2015-10-11 18:23:09.548873187 -0300
@@ -10,8 +10,8 @@ cdef extern from "sage/libs/polybori/pb_
pbdp_asc "CTypes::dp_asc"
pbblock_dlex "CTypes::block_dlex"
pbblock_dp_asc "CTypes::block_dp_asc"
- pbdp "17"
- pbblock_dp "19"
+ pbdp "(polybori::COrderEnums::ordercodes)17"
+ pbblock_dp "(polybori::COrderEnums::ordercodes)19"
cdef enum comparecodes "CCompareEnums::comparecodes":
less_than "CTypes::less_than"

View file

@ -1,27 +1,35 @@
diff -up src/sage/interfaces/qepcad.py.orig src/sage/interfaces/qepcad.py
--- src/sage/interfaces/qepcad.py.orig 2015-07-19 15:07:33.423329719 -0300
+++ src/sage/interfaces/qepcad.py 2015-07-19 15:07:50.294330365 -0300
@@ -522,8 +522,8 @@ TESTS:
--- src/sage/interfaces/qepcad.py.orig 2016-08-08 13:58:03.953585989 -0400
+++ src/sage/interfaces/qepcad.py 2016-08-08 14:00:58.323592666 -0400
@@ -530,8 +530,8 @@ TESTS:
Check the qepcad configuration file::
- sage: open('%s/default.qepcadrc'%SAGE_LOCAL).readlines()[-1]
- 'SINGULAR .../local/bin\n'
- 'SINGULAR .../bin\n'
+ sage: open('/usr/share/qepcad/default.qepcadrc').readlines()[-1]
+ 'SINGULAR /usr/bin\n'
AUTHORS:
Tests related to the not tested examples (nondeterministic order of atoms)::
@@ -550,6 +550,8 @@ from sage.repl.preparse import implicit_
@@ -606,7 +606,6 @@ AUTHORS:
from __future__ import print_function
from __future__ import absolute_import
from expect import Expect, ExpectFunction, AsciiArtString
-from sage.env import SAGE_LOCAL
import pexpect
import re
import sys
@@ -618,6 +617,8 @@ from sage.interfaces.tab_completion impo
from .expect import Expect, ExpectFunction, AsciiArtString
+QEPCAD_LOCAL = "/usr/share/qepcad"
+
def _qepcad_cmd(memcells=None):
def _qepcad_atoms(formula):
r"""
Construct a QEPCAD command line.
@@ -560,17 +562,17 @@ def _qepcad_cmd(memcells=None):
Return the atoms of a qepcad quantifier-free formula, as a set of strings.
@@ -647,17 +648,17 @@ def _qepcad_cmd(memcells=None):
sage: from sage.interfaces.qepcad import _qepcad_cmd
sage: s = _qepcad_cmd()
@ -42,7 +50,7 @@ diff -up src/sage/interfaces/qepcad.py.orig src/sage/interfaces/qepcad.py
_command_info_cache = None
@@ -595,7 +597,7 @@ def _update_command_info():
@@ -682,7 +683,7 @@ def _update_command_info():
cache = {}

View file

@ -1,7 +1,7 @@
diff -up src/sage/all.py.orig src/sage/all.py
--- src/sage/all.py.orig 2015-10-11 17:37:19.705767886 -0300
+++ src/sage/all.py 2015-10-11 17:37:41.748768730 -0300
@@ -294,11 +294,11 @@ def _write_started_file():
--- src/sage/all.py.orig 2016-08-08 13:29:42.192520823 -0400
+++ src/sage/all.py 2016-08-08 13:30:18.601522217 -0400
@@ -305,11 +305,11 @@ def _write_started_file():
Check that the file exists when Sage is running::

View file

@ -1,6 +1,6 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2015-12-09 18:09:26.357141568 -0200
+++ src/module_list.py 2015-12-09 18:09:36.501141956 -0200
--- 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
@@ -3,7 +3,7 @@ from glob import glob
from distutils.extension import Extension
from sage.env import SAGE_LOCAL
@ -9,28 +9,11 @@ diff -up src/module_list.py.orig src/module_list.py
+SAGE_INC = '/usr/include'
#########################################################
### BLAS setup
@@ -66,7 +66,7 @@ givaro_extra_compile_args =['-D__STDC_LI
### PolyBoRi settings
#########################################################
-polybori_extra_compile_args = []
+polybori_extra_compile_args = ['-DPBORI_USE_ORIGINAL_CUDD']
polybori_major_version = '0.8'
#########################################################
### pkg-config setup
diff -up src/setup.py.orig src/setup.py
--- src/setup.py.orig 2015-12-09 18:09:33.813141853 -0200
+++ src/setup.py 2015-12-09 18:13:21.819150584 -0200
@@ -64,6 +64,7 @@ except KeyError:
keep_going = False
# search for dependencies and add to gcc -I<path>
+SAGE_INC = '/usr/include'
include_dirs = sage_include_directories(use_sources=True)
# Manually add -fno-strict-aliasing, which is needed to compile Cython
@@ -567,11 +568,9 @@ def run_cythonize():
--- 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():
print('Enabling Cython profiling support')
profile = True
@ -44,7 +27,7 @@ diff -up src/setup.py.orig src/setup.py
force = True
version_file = os.path.join(os.path.dirname(__file__), '.cython_version')
@@ -620,21 +619,6 @@ print("Discovered Python/Cython sources,
@@ -618,21 +616,6 @@ print("Discovered Python/Cython sources,
#########################################################
@ -63,6 +46,6 @@ diff -up src/setup.py.orig src/setup.py
-
-
-#########################################################
### Distutils
### Install also Jupyter kernel spec
#########################################################

View file

@ -1,16 +1,103 @@
diff -up src/doc/common/builder.py.orig src/doc/common/builder.py
--- src/doc/common/builder.py.orig 2015-12-22 10:55:07.586513923 -0200
+++ src/doc/common/builder.py 2015-12-22 10:55:10.131514020 -0200
@@ -32,7 +32,7 @@ from sage.env import SAGE_DOC, SAGE_SRC
# SAGE_DOC, LANGUAGES, SPHINXOPTS, PAPER, OMIT,
# PAPEROPTS, ALLSPHINXOPTS, NUM_THREADS, WEBSITESPHINXOPTS
# from build_options.py.
-fpath = os.path.join(SAGE_DOC, 'common', 'build_options.py')
+fpath = os.path.join(os.getenv('SAGE_ROOT'), 'src', 'doc', 'common', 'build_options.py')
exec(compile(open(fpath).read(), fpath, 'exec'))
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', '
html_theme_options['mathjax_macros'] = sage_mathjax_macros()
from pkg_resources import Requirement, working_set
- sagenb_path = working_set.find(Requirement.parse('sagenb')).location
+ sagenb_path = SAGE_SRC
mathjax_relative = os.path.join('sagenb','data','mathjax')
@@ -303,12 +303,12 @@ class AllBuilder(object):
# 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
@@ -95,7 +95,6 @@ class DocTestDefaults(SageObject):
self.valgrind = False
self.massif = False
self.cachegrind = False
- self.omega = False
self.failed = False
self.new = False
self.show_skipped = False
@@ -270,7 +269,7 @@ class DocTestController(SageObject):
if options.gdb or options.debug:
# Interactive debuggers: "infinite" timeout
options.timeout = 0
- elif options.valgrind or options.massif or options.cachegrind or options.omega:
+ elif options.valgrind or options.massif or options.cachegrind:
# 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):
from sage.env import SAGE_SRC, SAGE_DOC_SRC, SAGE_ROOT
def all_files():
self.files.append(opj(SAGE_SRC, 'sage'))
- self.files.append(opj(SAGE_SRC, 'sage_setup'))
self.files.append(SAGE_DOC_SRC)
self.options.sagenb = True
DOT_GIT= opj(SAGE_ROOT, '.git')
@@ -1031,13 +1029,8 @@ class DocTestController(SageObject):
elif opt.cachegrind:
toolname = "cachegrind"
flags = os.getenv("SAGE_CACHEGRIND_FLAGS", "")
- elif opt.omega:
- toolname = "exp-omega"
- flags = os.getenv("SAGE_OMEGA_FLAGS", "")
cmd = "exec valgrind --tool=%s "%(toolname)
flags += ''' --log-file="%s" ''' % logfile
- if opt.omega:
- toolname = "omega"
if "%s" in flags:
flags %= toolname + ".%p" # replace %s with toolname
cmd += flags + sage_cmd
@@ -1097,10 +1090,10 @@ class DocTestController(SageObject):
0
"""
opt = self.options
- L = (opt.gdb, opt.valgrind, opt.massif, opt.cachegrind, opt.omega)
+ L = (opt.gdb, opt.valgrind, opt.massif, opt.cachegrind)
if any(L):
if L.count(True) > 1:
- self.log("You may only specify one of gdb, valgrind/memcheck, massif, cachegrind, omega")
+ self.log("You may only specify one of gdb, valgrind/memcheck, massif, cachegrind")
return 2
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():
nodes.clear()
node_names.clear()
- singular_docdir = os.environ["SAGE_LOCAL"]+"/share/singular/"
+ singular_docdir = os.environ["SINGULAR_BIN_DIR"]+"/info/"
new_node = re.compile("File: singular\.hlp, Node: ([^,]*),.*")
new_lookup = re.compile("\* ([^:]*):*([^.]*)\..*")
diff -up src/sage_setup/docbuild/ext/multidocs.py.orig src/sage_setup/docbuild/ext/multidocs.py
--- src/sage_setup/docbuild/ext/multidocs.py.orig 2016-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):
for ind in newalldoc:
# treat subdocument source as orphaned file and don't complain
md = env.metadata.get(ind, dict())
- md['orphan'] = 1
- env.metadata[ind] = md
+ try:
+ md['orphan'] = 1
+ env.metadata[ind] = md
+ except AttributeError:
+ env.metadata[ind] = {'orphan'}
# merge the citations
newcite = {}
for ind, (path, tag) in docenv.citations.iteritems():
diff -up src/sage_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
@@ -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)
try:
@ -25,7 +112,7 @@ diff -up src/doc/common/builder.py.orig src/doc/common/builder.py
raise
logger.warning("Elapsed time: %.1f seconds."%(time.time()-start))
logger.warning("Done building the documentation!")
@@ -500,12 +500,12 @@ class ReferenceBuilder(AllBuilder):
@@ -492,12 +492,12 @@ class ReferenceBuilder(AllBuilder):
# (See comment in AllBuilder._wrapper about using map instead of apply.)
x = pool.map_async(build_ref_doc, L, 1)
try:
@ -40,107 +127,3 @@ diff -up src/doc/common/builder.py.orig src/doc/common/builder.py
raise
# The html refman must be build at the end to ensure correct
# merging of indexes and inventories.
diff -up src/doc/common/conf.py.orig src/doc/common/conf.py
--- src/doc/common/conf.py.orig 2015-12-22 10:55:07.588513923 -0200
+++ src/doc/common/conf.py 2015-12-22 10:55:10.132514020 -0200
@@ -1,5 +1,5 @@
import sys, os, sphinx
-from sage.env import SAGE_DOC
+from sage.env import SAGE_DOC, SAGE_SRC
from datetime import date
def get_doc_abspath(path):
@@ -224,8 +224,7 @@ if (os.environ.get('SAGE_DOC_MATHJAX', '
from sage.misc.latex_macros import sage_mathjax_macros
html_theme_options['mathjax_macros'] = sage_mathjax_macros()
- from pkg_resources import Requirement, working_set
- sagenb_path = working_set.find(Requirement.parse('sagenb')).location
+ sagenb_path = SAGE_SRC
mathjax_relative = os.path.join('sagenb','data','mathjax')
# It would be really nice if sphinx would copy the entire mathjax directory,
diff -up src/doc/common/multidocs.py.orig src/doc/common/multidocs.py
--- src/doc/common/multidocs.py.orig 2015-12-22 10:55:07.591513923 -0200
+++ src/doc/common/multidocs.py 2015-12-22 10:55:10.132514020 -0200
@@ -73,8 +73,11 @@ def merge_environment(app, env):
for ind in newalldoc:
# treat subdocument source as orphaned file and don't complain
md = env.metadata.get(ind, set())
- md.add('orphan')
- env.metadata[ind] = md
+ try:
+ md.add('orphan')
+ env.metadata[ind] = md
+ except AttributeError:
+ env.metadata[ind] = {'orphan'}
# merge the citations
newcite = {}
for ind, (path, tag) in docenv.citations.iteritems():
diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py
--- src/sage/doctest/control.py.orig 2015-12-22 10:55:07.592513923 -0200
+++ src/sage/doctest/control.py 2015-12-22 10:55:27.152514672 -0200
@@ -90,7 +90,6 @@ class DocTestDefaults(SageObject):
self.valgrind = False
self.massif = False
self.cachegrind = False
- self.omega = False
self.failed = False
self.new = False
self.show_skipped = False
@@ -212,7 +211,7 @@ class DocTestController(SageObject):
if options.gdb or options.debug:
# Interactive debuggers: "infinite" timeout
options.timeout = 0
- elif options.valgrind or options.massif or options.cachegrind or options.omega:
+ elif options.valgrind or options.massif or options.cachegrind:
# Non-interactive debuggers: 48 hours
options.timeout = int(os.getenv('SAGE_TIMEOUT_VALGRIND', 48 * 60 * 60))
elif options.long:
@@ -545,7 +544,6 @@ class DocTestController(SageObject):
def all_files():
from glob import glob
self.files.append(opj(SAGE_SRC, 'sage'))
- self.files.append(opj(SAGE_SRC, 'sage_setup'))
self.files.append(opj(SAGE_SRC, 'doc', 'common'))
self.files.extend(glob(opj(SAGE_SRC, 'doc', '[a-z][a-z]')))
self.options.sagenb = True
@@ -940,13 +938,8 @@ class DocTestController(SageObject):
elif opt.cachegrind:
toolname = "cachegrind"
flags = os.getenv("SAGE_CACHEGRIND_FLAGS", "")
- elif opt.omega:
- toolname = "exp-omega"
- flags = os.getenv("SAGE_OMEGA_FLAGS", "")
cmd = "exec valgrind --tool=%s "%(toolname)
flags += ''' --log-file="%s" ''' % logfile
- if opt.omega:
- toolname = "omega"
if "%s" in flags:
flags %= toolname + ".%p" # replace %s with toolname
cmd += flags + sage_cmd
@@ -1006,10 +999,10 @@ class DocTestController(SageObject):
0
"""
opt = self.options
- L = (opt.gdb, opt.valgrind, opt.massif, opt.cachegrind, opt.omega)
+ L = (opt.gdb, opt.valgrind, opt.massif, opt.cachegrind)
if any(L):
if L.count(True) > 1:
- self.log("You may only specify one of gdb, valgrind/memcheck, massif, cachegrind, omega")
+ self.log("You may only specify one of gdb, valgrind/memcheck, massif, cachegrind")
return 2
return self.run_val_gdb()
else:
diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py
--- src/sage/interfaces/singular.py.orig 2015-12-22 10:55:07.594513923 -0200
+++ src/sage/interfaces/singular.py 2015-12-22 10:55:10.134514020 -0200
@@ -2232,7 +2232,7 @@ def generate_docstring_dictionary():
nodes.clear()
node_names.clear()
- singular_docdir = os.environ["SAGE_LOCAL"]+"/share/singular/"
+ singular_docdir = os.environ["SINGULAR_BIN_DIR"]+"/info/"
new_node = re.compile("File: singular\.hlp, Node: ([^,]*),.*")
new_lookup = re.compile("\* ([^:]*):*([^.]*)\..*")

View file

@ -1,15 +1,15 @@
diff -up build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/flask_version/base.py.orig build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/flask_version/base.py
--- build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/flask_version/base.py.orig 2015-04-03 14:57:55.335379915 -0300
+++ build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/flask_version/base.py 2015-04-03 14:59:22.805383265 -0300
diff -up build/pkgs/sagenb/src/sagenb/flask_version/base.py.orig build/pkgs/sagenb/src/sagenb/flask_version/base.py
--- build/pkgs/sagenb/src/sagenb/flask_version/base.py.orig 2016-08-15 06:09:20.786276308 -0400
+++ build/pkgs/sagenb/src/sagenb/flask_version/base.py 2016-08-15 06:09:23.074276396 -0400
@@ -4,8 +4,6 @@ from functools import partial
from flask import Flask, Module, url_for, render_template, request, session, redirect, g, make_response, current_app
from flask import Flask, Module, url_for, request, session, redirect, g, make_response, current_app, render_template
from decorators import login_required, guest_or_login_required, with_lock
from decorators import global_lock
-# Make flask use the old session foo from <=flask-0.9
-from flask_oldsessions import OldSecureCookieSessionInterface
from flask.ext.autoindex import AutoIndex
try:
from sage.env import SAGE_SRC, SAGE_DOC
@@ -25,7 +23,6 @@ class SageNBFlask(Flask):
def __init__(self, *args, **kwds):
self.startup_token = kwds.pop('startup_token', None)
@ -37,10 +37,10 @@ diff -up build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/flask_version/base.py.orig b
import mimetypes
mimetypes.add_type('text/plain','.jmol')
diff -up build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/misc/misc.py.orig build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/misc/misc.py
--- build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/misc/misc.py.orig 2015-04-03 14:58:07.335380375 -0300
+++ build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/misc/misc.py 2015-04-03 14:59:36.461383788 -0300
@@ -174,7 +174,8 @@ def pad_zeros(s, size=3):
diff -up build/pkgs/sagenb/src/sagenb/misc/misc.py.orig build/pkgs/sagenb/src/sagenb/misc/misc.py
--- build/pkgs/sagenb/src/sagenb/misc/misc.py.orig 2016-08-15 06:09:20.792276308 -0400
+++ build/pkgs/sagenb/src/sagenb/misc/misc.py 2016-08-15 06:09:23.076276396 -0400
@@ -176,7 +176,8 @@ def pad_zeros(s, size=3):
SAGENB_ROOT = os.path.split(resource_filename(__name__, ''))[0]
@ -50,10 +50,10 @@ diff -up build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/misc/misc.py.orig build/pkgs
if os.environ.has_key('DOT_SAGENB'):
DOT_SAGENB = os.environ['DOT_SAGENB']
diff -up build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/notebook/cell.py.orig build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/notebook/cell.py
--- build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/notebook/cell.py.orig 2015-04-03 14:58:19.246380831 -0300
+++ build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/notebook/cell.py 2015-04-03 15:00:09.605385057 -0300
@@ -2340,8 +2340,8 @@ class Cell(Cell_generic):
diff -up build/pkgs/sagenb/src/sagenb/notebook/cell.py.orig build/pkgs/sagenb/src/sagenb/notebook/cell.py
--- build/pkgs/sagenb/src/sagenb/notebook/cell.py.orig 2016-08-15 06:09:20.800276309 -0400
+++ build/pkgs/sagenb/src/sagenb/notebook/cell.py 2016-08-15 06:09:23.077276396 -0400
@@ -2350,8 +2350,8 @@ class Cell(Cell_generic):
with open(jmol_name, 'r') as f:
jmol_script = f.read()
jmol_script = jmol_script.replace(
@ -64,21 +64,21 @@ diff -up build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/notebook/cell.py.orig build/
with open(jmol_name, 'w') as f:
f.write(jmol_script)
diff -up build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/notebook/run_notebook.py.orig build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/notebook/run_notebook.py
--- build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/notebook/run_notebook.py.orig 2015-04-03 14:58:32.839381352 -0300
+++ build/pkgs/sagenb/src/sagenb-0.11.4/sagenb/notebook/run_notebook.py 2015-04-03 15:01:22.725387857 -0300
@@ -46,12 +46,14 @@ sagenb.notebook.misc.DIR = %(cwd)r #We s
diff -up build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py.orig build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py
--- build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py.orig 2016-08-15 06:09:20.806276309 -0400
+++ build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py 2016-08-15 06:10:30.060278961 -0400
@@ -46,12 +46,11 @@ sagenb.notebook.misc.DIR = %(cwd)r #We s
# Flask #
#########
import os, sys, random
-import sagenb.flask_version.base as flask_base
-opts={}
+sagenb_dir = os.path.join(os.environ['SAGE_ROOT'], 'src', 'sagenb')
+sys.path.append(sagenb_dir)
+import flask_version.base as flask_base
opts={}
startup_token = '{0:x}'.format(random.randint(0, 2**128))
if %(automatic_login)s:
opts['startup_token'] = startup_token
-if %(automatic_login)s:
- opts['startup_token'] = startup_token
-flask_app = flask_base.create_app(%(notebook_opts)s, **opts)
+flask_app = flask_base.create_app(%(notebook_opts)s, startup_token=startup_token)

View file

@ -1,12 +1,13 @@
diff -up src/bin/sage.orig src/bin/sage
--- src/bin/sage.orig 2015-11-07 11:53:13.984795336 -0200
+++ src/bin/sage 2015-11-07 11:53:51.199796761 -0200
@@ -13,19 +13,15 @@ usage() {
--- 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() {
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"
- echo " -experimental -- list all experimental packages that can be installed"
echo " -gap [...] -- run Sage's Gap with given arguments"
echo " -gap3 [...] -- run Sage's Gap3 with given arguments"
echo " -gp [...] -- run Sage's PARI/GP calculator with given arguments"
echo " -h, -? -- print this help message"
- echo " -i [packages] -- install the given Sage packages"
@ -15,13 +16,13 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -maxima [...] -- run Sage's Maxima with given arguments"
echo " -mwrank [...] -- run Sage's mwrank with given arguments"
echo " --notebook=[...] -- start the Sage notebook (valid options are"
echo " 'default', 'sagenb', and 'ipython')"
echo " 'default', 'sagenb', 'jupyter', and 'export')"
echo " -n, --notebook -- shortcut for --notebook=default"
- echo " -optional -- list all optional packages that can be installed"
echo " -python [...] -- run the Python interpreter"
echo " -R [...] -- run Sage's R with given arguments"
echo " -singular [...] -- run Sage's singular with given arguments"
@@ -41,10 +37,6 @@ usage() {
@@ -42,10 +38,6 @@ usage() {
echo " --optional - controls which optional tests are run"
echo " --sagenb - test all sagenb files"
echo " --help - show all testing options"
@ -32,7 +33,7 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -v, -version -- display Sage version information"
exit 0
}
@@ -63,11 +55,8 @@ usage_advanced() {
@@ -64,11 +56,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"
@ -44,8 +45,8 @@ diff -up src/bin/sage.orig src/bin/sage
echo
#### 1.......................26..................................................78
@@ -77,8 +66,6 @@ usage_advanced() {
echo " 'default', 'sagenb', and 'ipython'). See the output"
@@ -78,8 +67,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"
- echo " -bn, -build-and-notebook [...] -- build the Sage library then start"
@ -53,7 +54,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"
@@ -96,13 +83,9 @@ usage_advanced() {
@@ -98,12 +85,9 @@ usage_advanced() {
echo " -gp [...] -- run Sage's PARI/GP calculator with given arguments"
echo " -ipython [...] -- run Sage's IPython using the default environment (not"
echo " Sage), passing additional options to IPython"
@ -63,32 +64,35 @@ diff -up src/bin/sage.orig src/bin/sage
echo " -lisp [...] -- run Lisp interpreter included with Sage"
echo " -M2 [...] -- run Sage's Macaulay2 with given arguments"
- command -v M2 &>/dev/null || \
- echo " (not installed currently, run sage -i macaulay2)"
echo " (not installed currently, run sage -i macaulay2)"
echo " -maxima [...] -- run Sage's Maxima with given arguments"
echo " -mwrank [...] -- run Sage's mwrank with given arguments"
echo " -python [...] -- run the Python interpreter"
@@ -116,45 +99,7 @@ usage_advanced() {
@@ -118,49 +102,7 @@ usage_advanced() {
echo
#### 1.......................26..................................................78
#### |.....................--.|...................................................|
- echo "Installing packages and upgrading:"
- echo " -package [args] -- call the new package manager with given arguments."
- echo " Run without arguments for package-specific help."
- echo " -experimental -- list all experimental packages that can be installed"
- echo " -f [opts] [packages]-- shortcut for -i -f: force build of the given Sage"
- echo " packages"
- echo " -i [opts] [packages]-- install the given Sage packages (unless they are"
- echo " already installed); if no packages are given, print"
- echo " a list of all installed packages. Options:"
- echo " -i [opts] [packages]-- install the given Sage packages. Options:"
- echo " -c -- run the packages' test suites"
- echo " -d -- only download, do not install packages"
- echo " -f -- force build: install the packages even"
- echo " if they are already installed"
- echo " -s -- do not delete the spkg/build directories"
- echo " -s -- do not delete the temporary build directories"
- echo " after a successful build"
- echo " -p [opts] [packages]-- install the given Sage packages, without dependency"
- echo " checking and with support for old-style spkgs."
- echo " Options are -c, -d and -s with the same meaning as"
- echo " for the -i command"
- echo " -info [packages] -- print the SPKG.txt of the given packages"
- echo " --location -- if needed, fix paths to make Sage relocatable"
- echo " -optional -- list all optional packages that can be installed"
- echo " -standard -- list all standard packages that can be installed"
- echo " -installed -- list all installed packages"
- #echo " -update -- download latest non-optional Sage packages (do not build them)"
- #echo " -update-build -- build and install all downloaded non-optional Sage packages"
- echo " -upgrade [version] -- download, build and install the given version. Here,"
- echo " 'version' is a git branch or tag name. Useful values"
- echo " are 'master' (the current development version, this"
@ -114,7 +118,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"
@@ -184,7 +129,6 @@ usage_advanced() {
@@ -190,7 +132,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"
@ -122,15 +126,16 @@ 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"
@@ -204,15 +148,6 @@ usage_advanced() {
@@ -210,16 +151,6 @@ usage_advanced() {
echo
#### 1.......................26..................................................78
#### |.....................--.|...................................................|
- echo "Making Sage packages or distributions:"
- echo " -bdist <tmpdir> -- build a binary distribution of Sage"
- echo " -sdist -- build a source distribution of Sage"
- echo " -pkg <dir> -- create Sage package dir.spkg from a given directory"
- echo " -pkg_nc <dir> -- as -pkg, but do not compress the package"
- echo " -sdist -- build a source distribution of Sage"
- echo " -fix-pkg-checksums -- fix the checksums from build/pkgs directories from "
- echo " the packages located in upstream/"
-
- echo
- #### 1.......................26..................................................78
@ -138,7 +143,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"
@@ -226,9 +161,6 @@ usage_advanced() {
@@ -233,9 +164,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"
@ -148,17 +153,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'."
@@ -236,9 +168,6 @@ usage_advanced() {
exit 0
}
-# Check for '--nodotsage' before sourcing sage-env; otherwise sage-env
-# will already have set some environment variables with the old
-# setting for DOT_SAGE.
if [ "$1" = '--nodotsage' ]; then
export DOT_SAGE=`mktemp -d ${TMPDIR:-/tmp}/dotsageXXXXXX`
shift
@@ -248,34 +177,6 @@ if [ "$1" = '--nodotsage' ]; then
@@ -260,86 +188,6 @@ if [ "$1" = '--nodotsage' ]; then
exit $status
fi
@ -178,10 +173,63 @@ diff -up src/bin/sage.orig src/bin/sage
- exec local/bin/sage-upgrade "$@"
-fi
-
-# Check for '-i' before sourcing sage-env: running "make"
-# should be run outside of the Sage shell.
-if [ "$1" = '-f' ]; then
- # -f is an alias for -i -f
- set -- -i "$@"
-fi
-
-if [ "$1" = '-i' ]; then
- shift
- if [ -z "$MAKE" ]; then
- MAKE="make"
- fi
-
- set -e
-
- cd "$SAGE_ROOT"
-
- # First of all, make sure that the toolchain is up-to-date
- # (which is a dependency of every package)
- ./sage --location
- $MAKE all-toolchain
- echo
-
- INSTALL_OPTIONS="" # Options to sage-spkg
- for PKG in "$@"
- do
- case "$PKG" in
- -info|--info)
- echo >&2 "Error: 'sage -i $PKG <package>' is no longer supported, use 'sage --info <package>' instead."
- exit 2;;
- -f) FORCE_INSTALL=yes;;
- -*) INSTALL_OPTIONS="$INSTALL_OPTIONS $PKG";;
- *)
- # First check that $PKG is actually a Makefile target
- if ! grep "^$PKG: " build/make/Makefile >/dev/null; then
- echo >&2 "Error: package '$PKG' not found"
- echo >&2 "Assuming it is an old-style package... (this is deprecated: use -p instead of -i to install old-style packages)"
- echo >&2
- sleep 5
- ./sage -p $INSTALL_OPTIONS "$PKG"
- else
- if [ x$FORCE_INSTALL = xyes ]; then
- $MAKE "$PKG-clean"
- fi
- $MAKE SAGE_SPKG="sage-spkg $INSTALL_OPTIONS" "$PKG"
- fi;;
- esac
- done
- exit 0
-fi
-
-
-#####################################################################
-# Source sage-env ($0 is the name of this "sage" script, so we can just
-# append -env to that). We redirect stdout to stderr, which is safer
-# for scripts.
-#####################################################################
-. "$0-env" >&2
-if [ $? -ne 0 ]; then
- echo >&2 "Error setting environment variables by sourcing '$0-env';"
@ -189,11 +237,10 @@ 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
usage
@@ -287,25 +188,11 @@ fi
@@ -352,26 +200,12 @@ fi
# Prepare for running Sage, either interactively or non-interactively.
sage_setup() {
@ -209,9 +256,10 @@ diff -up src/bin/sage.orig src/bin/sage
- exit 1
- fi
-
# Display the startup banner
# Display the startup banner (unless SAGE_BANNER is explictly "no")
if [ "$SAGE_BANNER" != "no" ]; then
cat "$SAGE_LOCAL/bin/sage-banner"
# can be 'bare', or 'yes', or unspecified
echo "$SAGE_BANNER_TEXT"
fi
- maybe_sage_location
@ -219,7 +267,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
@@ -316,20 +203,6 @@ sage_setup() {
@@ -382,20 +216,6 @@ sage_setup() {
}
@ -240,7 +288,7 @@ diff -up src/bin/sage.orig src/bin/sage
# Start an interactive Sage session, this function never returns.
interactive_sage() {
sage_setup
@@ -396,7 +269,7 @@ fi
@@ -467,7 +287,7 @@ fi
if [ "$1" = '-singular' -o "$1" = '--singular' ]; then
shift
@ -249,7 +297,7 @@ diff -up src/bin/sage.orig src/bin/sage
fi
if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then
@@ -424,16 +297,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ]
@@ -495,16 +315,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ]
exec ecl "$@"
fi
@ -266,15 +314,22 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
shift
exec maxima "$@"
@@ -474,16 +337,6 @@ if [ "$1" = '-ipython' -o "$1" = '--ipyt
exec ipython "$@"
@@ -530,11 +340,6 @@ if [ "$1" = '-pip' -o "$1" = '--pip' ];
exec pip "$@"
fi
-if [ "$1" = '-git' -o "$1" = '--git' ]; then
-if [ "$1" = '-fix-pkg-checksums' -o "$1" = '--fix-pkg-checksums' ]; then
- shift
- exec git "$@"
- 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' ];
exec git "$@"
fi
-if [ "$1" = '-git-branch' -o "$1" = '--git-branch' ]; then
- shift
- exec git --git-dir="$SAGE_ROOT"/.git rev-parse --abbrev-ref HEAD
@ -283,7 +338,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
@@ -603,20 +456,6 @@ EOF
@@ -679,20 +479,6 @@ EOF
fi
#####################################################################
@ -304,7 +359,7 @@ diff -up src/bin/sage.orig src/bin/sage
# File conversion
#####################################################################
@@ -634,11 +473,6 @@ fi
@@ -710,11 +496,6 @@ fi
# Run Sage's versions of the standard Algebra/Geometry etc. software
#####################################################################
@ -316,7 +371,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 "$@"
@@ -649,13 +483,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not
@@ -725,13 +506,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not
exec sage-notebook "$@"
fi
@ -330,7 +385,7 @@ diff -up src/bin/sage.orig src/bin/sage
if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then
shift
sage-cleaner &>/dev/null &
@@ -674,31 +501,12 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep
@@ -750,38 +524,19 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep
exit 0
fi
@ -363,7 +418,15 @@ 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
@@ -715,17 +523,6 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1"
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"
fi
fi
@ -372,52 +435,41 @@ diff -up src/bin/sage.orig src/bin/sage
- build_sage
- fi
- shift
- SAGE_BANNER="no"
- sage_setup
- SAGE_BANNER=no sage_setup
- export PYTHONIOENCODING="utf-8" # Fix encoding for doctests
- exec sage-runtests --new "$@"
-fi
-
if [ "$1" = '-testall' -o "$1" = "--testall" ]; then
shift
SAGE_BANNER="no"
@@ -742,140 +539,6 @@ if [ "$1" = '-c' ]; then
SAGE_BANNER=no sage_setup
@@ -814,133 +559,6 @@ if [ "$1" = '-c' ]; then
exec sage-eval "$@"
fi
-if [ "$1" = '--location' ]; then
- maybe_sage_location
- exit 0
-fi
-
-
-install() {
- maybe_sage_location
-
- mkdir -p "$SAGE_LOGS"
- for PKG in "$@"
- do
- # Check for options
- case "$PKG" in
- -f) OPTF="-f"
- -*)
- INSTALL_OPTIONS="$INSTALL_OPTIONS $PKG"
- continue;;
- -m) OPTS="-s"
- echo >&2 "Warning: the -m option is deprecated since Sage 5.0. Use -s instead."
- continue;;
- -s) OPTS="-s"
- continue;;
- -c) OPTC="-c"
- continue;;
- --check) OPTC="-c"
- continue;;
- -info) OPTINFO="--info"
- continue;;
- --info) OPTINFO="--info"
- continue;;
- -*) echo >&2 "Error: unknown option '$PKG'"
- exit 2;;
- esac
-
- PKG_NAME=`echo "$PKG" | sed -e "s/\.spkg$//"`
- PKG_NAME=`basename "$PKG_NAME"`
-
- "$SAGE_ROOT"/build/make/pipestatus \
- "sage-spkg $OPTINFO $OPTF $OPTS $OPTC '$PKG' 2>&1" \
- "(trap '' SIGINT; tee -a '$SAGE_ROOT/logs/install.log' '$SAGE_LOGS/$PKG_NAME.log')"
- sage-logger \
- "sage-spkg $INSTALL_OPTIONS '$PKG'" "$SAGE_LOGS/$PKG_NAME.log"
- # Do not try to install further packages if one failed
- if [ $? -ne 0 ]; then
- exit 1
@ -434,6 +486,12 @@ diff -up src/bin/sage.orig src/bin/sage
- exit 0
-}
-
-
-if [ "$1" = '-package' -o "$1" = "--package" ]; then
- shift
- exec sage-package $@
-fi
-
-if [ "$1" = '-optional' -o "$1" = "--optional" ]; then
- shift
- exec sage-list-packages optional $@
@ -454,26 +512,15 @@ diff -up src/bin/sage.orig src/bin/sage
- exec sage-list-packages installed $@
-fi
-
-if [ "$1" = '-i' ]; then
-if [ "$1" = '-p' ]; then
- shift
- # If there are no further arguments, simply list all installed
- # packages.
- # If there are no further arguments, display usage help.
- if [ $# -eq 0 ]; then
- exec sage-spkg
- fi
- install "$@"
-fi
-
-if [ "$1" = '-f' ]; then
- shift
- # If there are no further arguments, simply list all installed
- # packages.
- if [ $# -eq 0 ]; then
- exec sage-spkg
- fi
- install -f "$@"
-fi
-
-if [ "$1" = '-info' -o "$1" = '--info' ]; then
- shift
- for PKG in "$@"
@ -508,21 +555,29 @@ diff -up src/bin/sage.orig src/bin/sage
- exec sage-rsyncdist $2
-fi
-
-if [ "$1" = '-bdist' -o "$1" = "--bdist" ]; then
- maybe_sage_location
- shift
- exec sage-bdist "$@"
-fi
-
-if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then
- shift
- exec python "$SAGE_DOC/common/builder.py" "$@"
- exec python -m "sage_setup.docbuild" "$@"
-fi
-
if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
-if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
- shift
- sage_setup
- if [ "$SAGE_DEBUG" = "no" ]; then
- gdb -x "$SAGE_LOCAL/bin/sage-gdb-commands" \
- -args python "$SAGE_LOCAL/bin/sage-ipython" "$@" -i
- else
- 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
shift
sage_setup
@@ -924,31 +587,11 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca
exec sage-preparse "$@"
@@ -975,21 +593,10 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca
exec sage-callgrind "$@"
fi
@ -540,24 +595,14 @@ diff -up src/bin/sage.orig src/bin/sage
- # Intentionally no "shift" here
- interactive_sage "$@"
-fi
-
-if [ "$1" = '-dev' -o "$1" = "--dev" ]; then
- shift
- exec sage-dev "$@"
-fi
-
if [ $# -ge 1 ]; then
- T=`echo "$1" | sed -e "s/.*\.//"`
- if [ "$T" = "spkg" ]; then
- install "$@"
- fi
SAGE_BANNER="no"
sage_setup
unset TERM # See Trac #12263
T=`echo "$1" | sed -e "s/.*\.//"`
if [ "$T" = "spkg" ]; then
diff -up src/bin/sage-runtests.orig src/bin/sage-runtests
--- src/bin/sage-runtests.orig 2015-11-07 11:53:13.991795336 -0200
+++ src/bin/sage-runtests 2015-11-07 11:53:18.458795507 -0200
@@ -55,10 +55,6 @@ if __name__ == "__main__":
--- 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
@@ -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 " +
os.path.join(os.environ["DOT_SAGE"], "valgrind"))
@ -569,8 +614,8 @@ diff -up src/bin/sage-runtests.orig src/bin/sage-runtests
parser.add_option("-f", "--failed", action="store_true", default=False,
help="doctest only those files that failed in the previous run")
diff -up src/bin/sage-valgrind.orig src/bin/sage-valgrind
--- src/bin/sage-valgrind.orig 2015-11-07 11:53:13.997795336 -0200
+++ src/bin/sage-valgrind 2015-11-07 11:53:18.458795507 -0200
--- 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
@@ -1,16 +1,6 @@
#!/usr/bin/env bash

View file

@ -1,7 +1,7 @@
diff -up src/sage/env.py.orig src/sage/env.py
--- src/sage/env.py.orig 2015-10-11 18:09:31.532841862 -0300
+++ src/sage/env.py 2015-10-11 18:09:40.426842203 -0300
@@ -87,7 +87,7 @@ _add_variable_or_fallback('HOSTNAME',
--- 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
@@ -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
@ -10,12 +10,12 @@ diff -up src/sage/env.py.orig src/sage/env.py
_add_variable_or_fallback('SAGE_LOCAL', opj('$SAGE_ROOT', 'local'))
_add_variable_or_fallback('SAGE_ETC', opj('$SAGE_LOCAL', 'etc'))
_add_variable_or_fallback('SAGE_INC', opj('$SAGE_LOCAL', 'include'))
@@ -102,7 +102,7 @@ _add_variable_or_fallback('SAGE_CYTHONIZ
@@ -111,7 +111,7 @@ _add_variable_or_fallback('SAGE_CYTHONIZ
_add_variable_or_fallback('SAGE_EXTCODE', opj('$SAGE_SHARE', 'sage', 'ext'))
_add_variable_or_fallback('SAGE_LOGS', opj('$SAGE_ROOT', 'logs', 'pkgs'))
_add_variable_or_fallback('SAGE_SPKG_INST', opj('$SAGE_LOCAL', 'var', 'lib', 'sage', 'installed'))
-_add_variable_or_fallback('SAGE_DOC', opj('$SAGE_SRC', 'doc'))
+_add_variable_or_fallback('SAGE_DOC', '@@SAGE_DOC@@')
-_add_variable_or_fallback('SAGE_DOC_SRC', opj('$SAGE_SRC', 'doc'))
+_add_variable_or_fallback('SAGE_DOC_SRC', '@@SAGE_DOC@@')
_add_variable_or_fallback('SAGE_DOC', opj('$SAGE_SHARE', 'doc', 'sage'))
_add_variable_or_fallback('DOT_SAGE', opj(os.environ.get('HOME','$SAGE_ROOT'), '.sage'))
_add_variable_or_fallback('SAGE_DOT_GIT', opj('$SAGE_ROOT', '.git'))
_add_variable_or_fallback('SAGE_DISTFILES', opj('$SAGE_ROOT', 'upstream'))

View file

@ -1,6 +1,7 @@
%global __provides_exclude_from .*/site-packages/.*\\.so
%bcond_without bundled_pari
%bcond_with bundled_pexpect
# for faster full rpm test builds
%ifarch %{ix86} x86_64
@ -15,6 +16,9 @@
# use an workaround to match upstream sagemath patched sphinx
%bcond_without sphinx_hack
# use workaround to match upstream sagemath patched cython
%bcond_without cython_hack
%ifarch x86_64
%bcond_without fes
%else
@ -27,17 +31,20 @@
%global SAGE_TIMEOUT_LONG 180
%global conway_polynomials_pkg conway_polynomials-0.4
%global cysignals_pkg cysignals-1.1.1
%global elliptic_curves_pkg elliptic_curves-0.8
%global flintqs_pkg flintqs-20070817
%global graphs_pkg graphs-20130920
%global flintqs_pkg flintqs-1.0
%global graphs_pkg graphs-20151224
%if %{with bundled_pari}
%global pari_pkg pari-2.8-1637-g489005a
%global pari_pkg pari-2.8-2771-gb70b447
%endif
%if %{with bundled_pexpect}
%global pexpect_pkg pexpect-4.1.0
%endif
%global pexpect_pkg pexpect-2.0
%global polytopes_db_pkg polytopes_db-20120220
%global rubiks_pkg rubiks-20070912
%global sagenb_pkg sagenb-0.11.4
%global sagetex_pkg sagetex-2.3.4
%global sagenb_pkg sagenb-0.13
%global sagetex_pkg sagetex-3.0
%global SAGE_ROOT %{_libdir}/sagemath
%global SAGE_LOCAL %{SAGE_ROOT}/local
@ -51,8 +58,8 @@
Name: sagemath
Group: Applications/Engineering
Summary: A free open-source mathematics software system
Version: 6.8
Release: 14%{?dist}
Version: 7.3
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
@ -90,85 +97,101 @@ Patch6: %{name}-sagenb.patch
# do not attempt to create state files in system directories
Patch7: %{name}-readonly.patch
# do not link explicitly to png12
Patch8: %{name}-png.patch
# work with all maxima-runtime lisp backend packages
Patch9: %{name}-maxima.patch
Patch8: %{name}-maxima.patch
# execute 4ti2 programs in $PATH not in $SAGE_ROOT/local/bin
Patch10: %{name}-4ti2.patch
Patch9: %{name}-4ti2.patch
# http://trac.sagemath.org/sage_trac/ticket/12992
# http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1317
Patch11: %{name}-pari.patch
Patch10: %{name}-pari.patch
# use jmol itself to export preview images
# FIXME besides not using X and told so, fails if DISPLAY is not set
Patch12: %{name}-jmol.patch
Patch11: %{name}-jmol.patch
# only cremona mini database built and installed
# FIXME add a package with the full cremona database
# FIXME actually it should be already available in pari-elldata
Patch13: %{name}-cremona.patch
Patch12: %{name}-cremona.patch
# lrslib is a requires
Patch14: %{name}-lrslib.patch
Patch13: %{name}-lrslib.patch
# correct path to the nauty geng program
# http://cs.anu.edu.au/~bdm/nauty/
# http://pallini.di.uniroma1.it/
Patch15: %{name}-nauty.patch
Patch14: %{name}-nauty.patch
# Use system gap hap package
Patch16: %{name}-gap-hap.patch
# gap hap package not (yet) available
# http://www-gap.mcs.st-and.ac.uk/Packages/hap.html
Patch15: %{name}-gap-hap.patch
# correct path to Lfunction include
Patch17: %{name}-lcalc.patch
Patch16: %{name}-lcalc.patch
# avoid assertion in coin backend
Patch18: %{name}-cbc.patch
Patch17: %{name}-cbc.patch
# Use system gap directories
Patch19: %{name}-libgap.patch
Patch18: %{name}-libgap.patch
# Build fes
Patch20: %{name}-fes-build.patch
Patch19: %{name}-fes-build.patch
# Disable fes
Patch21: %{name}-fes.patch
Patch20: %{name}-fes.patch
# Side effect of using distro packages
# https://bugzilla.redhat.com/show_bug.cgi?id=974769
Patch22: %{name}-sympy.patch
Patch21: %{name}-sympy.patch
# Fix a name clash with NTL
Patch23: %{name}-ntl.patch
# Fix a changed interface in NTL 9.x
Patch24: %{name}-ntl9.patch
Patch22: %{name}-ntl.patch
# Correct unable to start QEPCAD within sage
# https://bugzilla.redhat.com/show_bug.cgi?id=1243590
Patch25: %{name}-qepcad.patch
# Temporary correction for invalid conversion from
# 'int' to 'polybori::COrderEnums::ordercodes'
Patch26: %{name}-polybori.patch
Patch23: %{name}-qepcad.patch
# Correct path to arb headers
Patch27: %{name}-arb.patch
Patch24: %{name}-arb.patch
# Adapt to header file changes in givaro 4 and linbox 1.4
Patch28: %{name}-givaro.patch
Patch25: %{name}-givaro.patch
# No support for f" notation
Patch26: %{name}-nofstring.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1296652
Patch27: sig_includes.patch
# Add missing include paths
Patch28: %{name}-includes.patch
# https://trac.sagemath.org/ticket/20926
# #error This file requires compiler and library support for the ISO C++ \
# 2011 standard. This support must be enabled with the -std=c++11 \
# or -std=gnu++11 compiler options.
Patch29: %{name}-gcc6.patch
# Use ipython3 (mostly a rediff from sagemath-6.8 sage/repl)
Patch30: %{name}-ipython3.patch
# Use atlas blas
Patch31: %{name}-atlas.patch
# Correct side effect of sagemath-ipython3 patch
Patch32: %{name}-is_in_terminal.patch
BuildRequires: 4ti2
BuildRequires: arb-devel
BuildRequires: atlas-devel
BuildRequires: brial-devel
BuildRequires: cddlib-tools
BuildRequires: cliquer-devel
BuildRequires: coin-or-Cbc-devel
BuildRequires: cryptominisat-devel
BuildRequires: Cython >= 0.21.1
BuildRequires: Cython
BuildRequires: desktop-file-utils
BuildRequires: dos2unix
BuildRequires: dvipng
@ -178,15 +201,12 @@ BuildRequires: factory-devel
%if %{with fes}
BuildRequires: fes-devel
%endif
BuildRequires: flint-devel >= 2.3
BuildRequires: flint-devel
BuildRequires: gmp-ecm-devel
BuildRequires: gap
BuildRequires: GAPDoc
BuildRequires: gap-libs
BuildRequires: gap-pkg-atlasrep
BuildRequires: gap-pkg-ctbllib
BuildRequires: gap-pkg-design
BuildRequires: gap-pkg-hap
BuildRequires: gap-pkg-sonata
BuildRequires: gap-pkg-tomlib
BuildRequires: gc-devel
@ -230,10 +250,13 @@ BuildRequires: python-flask-silk
BuildRequires: python-ipython
BuildRequires: python-matplotlib
BuildRequires: python-networkx
%if %{without bundled_pexpect}
BuildRequires: python-pexpect
%endif
BuildRequires: python-pkgconfig
BuildRequires: python-sphinx
BuildRequires: python-twisted
BuildRequires: python-twisted-web
BuildRequires: polybori-devel
BuildRequires: R
BuildRequires: ratpoints-devel
BuildRequires: readline-devel
@ -259,10 +282,7 @@ Requires: firefox
Requires: gap
Requires: GAPDoc
Requires: gap-libs
Requires: gap-pkg-atlasrep
Requires: gap-pkg-ctbllib
Requires: gap-pkg-design
Requires: gap-pkg-hap
Requires: gap-pkg-sonata
Requires: gap-pkg-tomlib
Requires: genus2reduction
@ -273,10 +293,12 @@ Requires: jsmol
Requires: jsmath-fonts
Requires: lrslib-utils
Requires: maxima-gui
Requires: mathjax
Requires: maxima-runtime-ecl
Requires: nauty
Requires: palp
Requires: pari-gp
Requires: python-brial
Requires: python-crypto
Requires: python-cvxopt
Requires: python-docutils
@ -287,7 +309,9 @@ Requires: python-flask-silk
Requires: python-ipython
Requires: python-matplotlib
Requires: python-networkx
Requires: python-polybori
%if %{without bundled_pexpect}
Requires: python-pexpect
%endif
Requires: python-sphinx
Requires: python-twisted
Requires: python-twisted-mail
@ -547,6 +571,11 @@ computations, and plots from the Sage mathematics software suite
%prep
%setup -q -n sage-%{version}
pushd build/pkgs/cysignals
tar jxf ../../../upstream/%{cysignals_pkg}.tar.bz2
mv %{cysignals_pkg} src
popd
pushd build/pkgs/conway_polynomials
tar jxf ../../../upstream/%{conway_polynomials_pkg}.tar.bz2
mv %{conway_polynomials_pkg} src
@ -558,13 +587,8 @@ pushd build/pkgs/elliptic_curves
popd
pushd build/pkgs/flintqs
tar jxf ../../../upstream/%{flintqs_pkg}.tar.bz2
tar zxf ../../../upstream/%{flintqs_pkg}.tar.bz2
mv %{flintqs_pkg} src
pushd src
for diff in `ls ../patches/*.patch`; do
patch -p1 < $diff
done
popd
popd
pushd build/pkgs/graphs
@ -586,8 +610,9 @@ pushd build/pkgs/pari
popd
%endif
%if %{with bundled_pexpect}
pushd build/pkgs/pexpect
tar jxf ../../../upstream/%{pexpect_pkg}.tar.bz2
tar zxf ../../../upstream/%{pexpect_pkg}.tar.gz
mv %{pexpect_pkg} src
pushd src
for diff in `ls ../patches/*.patch`; do
@ -595,6 +620,7 @@ pushd build/pkgs/pexpect
done
popd
popd
%endif
pushd build/pkgs/polytopes_db
tar jxf ../../../upstream/%{polytopes_db_pkg}.tar.bz2
@ -613,15 +639,12 @@ pushd build/pkgs/rubiks
popd
pushd build/pkgs/sagenb
tar xf ../../../upstream/%{sagenb_pkg}.tar
tar jxf ../../../upstream/%{sagenb_pkg}.tar.bz2
mv %{sagenb_pkg} src
pushd src
tar zxf %{sagenb_pkg}.tar.gz
popd
popd
pushd build/pkgs/sagetex
tar jxf ../../../upstream/%{sagetex_pkg}.tar.bz2
tar zxf ../../../upstream/%{sagetex_pkg}.tar.gz
mv %{sagetex_pkg} src
popd
@ -634,12 +657,12 @@ popd
%patch7
%patch8
%patch9
%patch10
%if %{without bundled_pari}
%patch11
%patch10
%endif
%patch11
%patch12
%patch13
%patch14
@ -647,55 +670,51 @@ popd
%patch16
%patch17
%patch18
%patch19
%if %{with fes}
%patch20
%patch19
%else
%patch21
%patch20
%endif
%patch21
%patch22
%patch23
%patch24
%patch25
%patch26
%patch27
%patch28
%patch29
%patch30
%patch31
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
-e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
-i src/sage/env.py
sed -e 's|@@CYSIGNALS@@|%{_builddir}%{python_sitearch}/cysignals|' \
-i src/setup.py
sed -e "s|, 'flask-oldsessions>=0.10'||" \
-e "s|'http://github.com/mitsuhiko/flask-oldsessions/tarball/master#egg=flask-oldsessions-0.10'||" \
-i build/pkgs/sagenb/src/%{sagenb_pkg}/setup.py
-i build/pkgs/sagenb/src/setup.py
#------------------------------------------------------------------------
# ensure proper/preferred libatlas is in linker path
perl -pi -e 's|^(extra_link_args = ).*|$1\["-L%{_libdir}/atlas"\]|;' src/sage/misc/cython.py
%if 0%{?fedora} > 20
perl -pi -e "s|return 'atlas'|return 'satlas'|;" src/sage/misc/cython.py
%endif
# some .c files are not (re)generated
find src/sage \( -name \*.pyx -o -name \*.pxd \) | xargs touch
# remove bundled jar files before build
rm build/pkgs/sagenb/src/%{sagenb_pkg}/sagenb/data/sage3d/lib/sage3d.jar
rm build/pkgs/sagenb/src/sagenb/data/sage3d/lib/sage3d.jar
# remove binary egg
rm -r build/pkgs/sagenb/src/%{sagenb_pkg}/sagenb.egg-info
rm -r build/pkgs/sagenb/src/sagenb.egg-info
# fix Singular paths
sed -e "s,SINGULARPATH=\",&%{_libdir}/Singular/LIB:," \
-e "s,\(SINGULAR_EXECUTABLE=\"\).*\",\1%{_libdir}/Singular/Singular\"," \
-i src/bin/sage-env
# fix givaro interface on 32-bit platforms
if [ "%{__isa_bits}" == "32" ]; then
sed -i 's/int64_t/int32_t/' src/sage/libs/singular/singular.pyx
fi
########################################################################
%build
export CC=%{__cc}
@ -755,23 +774,37 @@ sed -i 's|\(^extra_link_args = \[\) \]|\1"-L%{_builddir}/lib"\]|' \
src/setup.py
%endif
pushd build/pkgs/cysignals/src
%__python2 setup.py build
%__python2 setup.py install --root %{_builddir}
popd
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
pushd %{_builddir}%{python_sitearch}
patch -p1 < $PATCH
patch -p1 < %{PATCH27}
popd
%endif
# Restore environment used to generate bundled interfaces
export PATH=$save_PATH
export SAGE_LOCAL=$save_LOCAL
%if 1
pushd src
%__python2 -u ./setup.py build
popd
%endif
#------------------------------------------------------------------------
pushd build/pkgs/sagenb/src/%{sagenb_pkg}
pushd build/pkgs/sagenb/src
%__python2 ./setup.py build
popd
#------------------------------------------------------------------------
pushd build/pkgs/flintqs/src
%configure
make %{?_smp_mflags} CPP="g++ %{optflags} -fPIC"
popd
@ -779,7 +812,6 @@ pushd build/pkgs/rubiks/src
make %{?_smp_mflags} CC="gcc -fPIC" CXX="g++ -fPIC" CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
popd
%if 1
# Remove buildroot reference from cython comments
perl -pi -e 's|%{buildroot}||g;' `find src/build/cythonized -type f`
@ -789,7 +821,6 @@ rm -f `grep -lr "%{buildroot}" src/build/temp.linux-*/`
pushd src
%__python2 ./setup.py build
popd
%endif
# last build command
rm -fr $DOT_SAGE
@ -828,9 +859,51 @@ ln -sf %{_libdir} $SAGE_LOCAL/lib
ln -sf %{_includedir} $SAGE_LOCAL/include
ln -sf %{_datadir} $SAGE_LOCAL/share
#------------------------------------------------------------------------
%if %{with cython_hack}
mkdir -p %{buildroot}%{python_sitearch}
cp -far %{python_sitearch}/Cython %{buildroot}%{python_sitearch}
PATCH=$PWD/build/pkgs/cython/patches/pxi_sys_path.patch
pushd %{buildroot}%{python_sitearch}
patch -p1 < $PATCH
patch -p1 < %{PATCH30}
popd
%endif
#------------------------------------------------------------------------
pushd build/pkgs/cysignals/src
pushd docs
%__make html
popd
%__python2 setup.py install --root %{buildroot}
mv %{buildroot}%{_bindir}/cysignals* $SAGE_LOCAL/bin
popd
#------------------------------------------------------------------------
pushd src/ext
mkdir -p $SAGE_ETC
for dir in \
gap \
graphs \
images \
magma \
mwrank \
notebook-ipython; do
COUNT=`find $dir -type f | wc -l `
if [ $COUNT -gt 0 ]; then
cp -far $dir $SAGE_ETC
fi
cp -far pari $SAGE_ETC
done
cp -fa %{SOURCE1} $SAGE_ETC
popd
#------------------------------------------------------------------------
pushd src
%__python2 -u setup.py install --root=%{buildroot}
# 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 %{with docs}
# install documentation sources
rm -fr $SAGE_DOC/{common,en,fr}
@ -846,7 +919,7 @@ sed -i 's|\(^ include_directories = \[SAGE_INC,\).*|\1|' \
%endif
#------------------------------------------------------------------------
pushd build/pkgs/sagenb/src/%{sagenb_pkg}
pushd build/pkgs/sagenb/src
rm -f %{buildroot}%{python_sitearch}/sagenb/data/sage3d/sage3d
%__python2 setup.py install --root=%{buildroot} --install-purelib=%{python_sitearch}
# jsmol
@ -857,12 +930,16 @@ pushd build/pkgs/sagenb/src/%{sagenb_pkg}
ln -sf %{SAGE_LOCAL}/bin/sage3d %{buildroot}%{python_sitearch}/sagenb/data/sage3d/sage3d
%endif
ln -sf %{python_sitearch}/sagenb %{buildroot}%{SAGE_SRC}/sagenb
# use system mathjax
ln -sf %{_jsdir}/mathjax %{buildroot}%{python_sitearch}/sagenb/data/mathjax
popd
#------------------------------------------------------------------------
%if %{with bundled_pexpect}
pushd build/pkgs/pexpect/src
cp -fa {ANSI,FSM,pexpect,pxssh,screen}.py $SAGE_PYTHONPATH
cp -fa pexpect $SAGE_PYTHONPATH
popd
%endif
#------------------------------------------------------------------------
cp -fa COPYING.txt $SAGE_ROOT
@ -883,7 +960,7 @@ install -p -m755 src/bin/sage $SAGE_LOCAL/bin
#------------------------------------------------------------------------
pushd build/pkgs/flintqs/src
cp -fa QuadraticSieve $SAGE_LOCAL/bin
cp -fa src/QuadraticSieve $SAGE_LOCAL/bin
popd
pushd build/pkgs/rubiks/src
@ -959,25 +1036,6 @@ pushd build/pkgs/elliptic_curves
%__python2 ./spkg-install
popd
#------------------------------------------------------------------------
pushd src/ext
mkdir -p $SAGE_ETC
for dir in \
gap \
graphs \
images \
magma \
mwrank \
notebook-ipython; do
COUNT=`find $dir -type f | wc -l `
if [ $COUNT -gt 0 ]; then
cp -far $dir $SAGE_ETC
fi
cp -far pari $SAGE_ETC
done
cp -fa %{SOURCE1} $SAGE_ETC
popd
#------------------------------------------------------------------------
pushd build/pkgs/graphs
mkdir -p $SAGE_SHARE/graphs
@ -994,12 +1052,11 @@ popd
pushd build/pkgs/sagetex/src
%__python2 setup.py install --root=%{buildroot} --install-purelib=%{python_sitearch}
install -p -m 0644 -D %{SOURCE2} \
%{buildroot}%{_datadir}/texmf/tex/generic/sagetex/makecmds.sty
mv %{buildroot}%{_docdir}/{sagetex,%{sagetex_pkg}}
mv %{buildroot}%{_datadir}/texmf/tex/generic/sagetex/CONTRIBUTORS \
%{buildroot}%{_docdir}/%{sagetex_pkg}
%{buildroot}%{_datadir}/texmf/tex/latex/sagetex/makecmds.sty
mv %{buildroot}%{_datadir}/texmf/tex/latex/sagetex/CONTRIBUTORS \
%{buildroot}%{_docdir}/sagetex
for file in PKG-INFO README; do
install -p -m 0644 $file %{buildroot}%{_docdir}/%{sagetex_pkg}/$file
install -p -m 0644 $file %{buildroot}%{_docdir}/sagetex/$file
done
popd
@ -1018,6 +1075,7 @@ export SAGE_EXTCODE="$SAGE_ETC"
export SAGE_ETC="$SAGE_ETC"
export SAGE_SRC="%{buildroot}%{SAGE_SRC}"
##export SAGE_DOC="$SAGE_DOC"
##export SAGE_DOC_SRC="\$SAGE_DOC"
module load 4ti2-%{_arch}
module load lrcalc-%{_arch}
module load surf-geometry-%{_arch}
@ -1064,16 +1122,19 @@ popd
%if %{with docs}
#------------------------------------------------------------------------
cp -f $SAGE_PYTHONPATH/{ANSI,FSM,pexpect,pxssh,screen}.py %{buildroot}%{python_sitearch}
%if %{with bundled_pexpect}
cp -fa $SAGE_PYTHONPATH/pexpect %{buildroot}%{python_sitearch}
%endif
# Build documentation, using %#{buildroot} environment
export SAGE_SETUP=$PWD/src/sage_setup
pushd src/doc
export SAGE_DOC=`pwd`
export PATH=%{buildroot}%{_bindir}:$SAGE_LOCAL/bin:$PATH
export SINGULARPATH=%{_libdir}/Singular/LIB
export SINGULAR_BIN_DIR=%{_libdir}/Singular
export LD_LIBRARY_PATH=%{_libdir}/atlas:$LD_LIBRARY_PATH
export PYTHONPATH=%{buildroot}%{python_sitearch}:$SAGE_PYTHONPATH:$SAGE_DOC
export PYTHONPATH=$SAGE_SETUP:%{buildroot}%{python_sitearch}:$SAGE_PYTHONPATH:$SAGE_DOC
%if %{with sphinx_hack}
cp -far %{python_sitelib}/sphinx %{buildroot}%{python_sitearch}
@ -1083,22 +1144,18 @@ pushd src/doc
# there we go
ln -sf %{buildroot}%{SAGE_DOC} %{buildroot}%{SAGE_SRC}/doc
LANGUAGES="ca de en fr hu it pt ru tr" \
%__python2 common/builder.py --no-pdf-links -k all html
export SAGE_DOC=%{buildroot}%{SAGE_DOC}
cp -far output $SAGE_DOC
export SAGE_DOC_SRC=$SAGE_DOC
# python -m sage_setup.docbuild
# FIXME there is a 'ja' translation, but adding it to $LANGUAGES
# does not get documentation built
LANGUAGES="ca de en fr hu it pt ru tr" \
%__python2 -m docbuild --no-pdf-links -k all html
rm -f %{buildroot}%{SAGE_SRC}/doc
ln -sf %{SAGE_DOC} %{buildroot}%{SAGE_SRC}/doc
# should not be required and encodes buildroot
rm -fr $SAGE_DOC/output/doctrees
# FIXME missing; but at least some are not. Maybe this can be removed?
for css in $(find $SAGE_DOC/output/html -name classic.css); do
pushd $(dirname $css)
ln -sf classic.css default.css
popd
done
popd
%if %{with check}
@ -1110,12 +1167,18 @@ install -p -m644 $DOT_SAGE/tmp/test.log $SAGE_DOC/test.log
sed -i 's|%{buildroot}||g' $SAGE_DOC/test.log
%endif
rm -f %{buildroot}%{python_sitearch}/{ANSI,FSM,pexpect,pxssh,screen}.py{,c}
%if %{with bundled_pexpect}
rm -f %{buildroot}%{python_sitearch}/pexpect
%endif
%if %{with sphinx_hack}
rm -fr %{buildroot}%{python_sitearch}/sphinx
%endif
%if %{with cython_hack}
rm -fr %{buildroot}%{python_sitearch}/Cython
%endif
# More wrong buildroot references
perl -pi -e 's|%{buildroot}||g;' \
-e "s|$PWD/src/doc|%{SAGE_DOC}|g;" \
@ -1139,7 +1202,7 @@ ln -sf %{SAGE_SHARE} $SAGE_ROOT/share
ln -sf src $SAGE_ROOT/devel
# Install menu and icons
pushd build/pkgs/sagenb/src/%{sagenb_pkg}/sagenb/data
pushd build/pkgs/sagenb/src/sagenb/data
install -p -m644 -D sage/images/icon128x128.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
popd
mkdir -p %{buildroot}%{_datadir}/applications
@ -1176,9 +1239,6 @@ rm -fr %{buildroot}%{SAGE_DOC}/output/inventory
find %{buildroot}%{SAGE_DOC} -type d -name _sources | xargs rm -fr
%endif
# remove bundles fonts
rm -r %{buildroot}%{python_sitearch}/sagenb/data/mathjax/fonts
# remove .po files
rm %{buildroot}%{python_sitearch}/sagenb/translations/*/LC_MESSAGES/*.po
@ -1204,7 +1264,7 @@ install -D -m 644 %{_builddir}/share/pari/pari.desc \
# make sure pari is in link path
ln -s libpari-gmp-2.8.so.0.0.0 %{buildroot}%{SAGE_ROOT}/lib/libpari.so
perl -pi -e 's|^(extra_link_args = \[.*)]|$1, "-L%{SAGE_ROOT}/lib"\]|;' %{buildroot}%{python_sitearch}/sage/misc/cython.py
perl -pi -e 's|(libdirs = cblas_library_dirs)|$1 + \["%{SAGE_ROOT}/lib"\]|;' %{buildroot}%{python_sitearch}/sage/misc/cython.py
%endif
# remove sage_setup
@ -1297,8 +1357,6 @@ exit 0
%endif
%{SAGE_SRC}/sage
%dir %{SAGE_PYTHONPATH}
# MIT
%{SAGE_PYTHONPATH}/*.py*
# GPLv2+
%{_bindir}/sage
%{_datadir}/pixmaps/%{name}.png
@ -1312,8 +1370,11 @@ exit 0
#------------------------------------------------------------------------
%files core
# GPLv2+
%{SAGE_LOCAL}/bin/cysignals*
%{python_sitearch}/sage
%{python_sitearch}/sage-*.egg-info
%{python_sitearch}/cysignals
%{python_sitearch}/cysignals-*.egg-info
#------------------------------------------------------------------------
%files data
@ -1337,11 +1398,9 @@ exit 0
%files data-etc
# GPLv2+
%{SAGE_ETC}/gap
#%#{SAGE_ETC}/graphs
%{SAGE_ETC}/images
%{SAGE_ETC}/magma
%{SAGE_ETC}/mwrank
#%#{SAGE_ETC}/notebook-ipython
%{SAGE_ETC}/pari
#------------------------------------------------------------------------
@ -1361,62 +1420,62 @@ exit 0
# GPLv2+
%dir %{SAGE_DOC}
%{SAGE_DOC}/common
%dir %{SAGE_DOC}/output
%dir %{SAGE_DOC}/output/html
%{SAGE_DOC}/output
%dir %{SAGE_DOC}/html
#------------------------------------------------------------------------
%files doc-ca
# GPLv2+
%{SAGE_DOC}/ca
%{SAGE_DOC}/output/html/ca
%{SAGE_DOC}/html/ca
#------------------------------------------------------------------------
%files doc-de
# GPLv2+
%{SAGE_DOC}/de
%{SAGE_DOC}/output/html/de
%{SAGE_DOC}/html/de
#------------------------------------------------------------------------
%files doc-en
# GPLv2+
%{SAGE_DOC}/en
%{SAGE_DOC}/output/html/en
%{SAGE_DOC}/html/en
#------------------------------------------------------------------------
%files doc-fr
# GPLv2+
%{SAGE_DOC}/fr
%{SAGE_DOC}/output/html/fr
%{SAGE_DOC}/html/fr
#------------------------------------------------------------------------
%files doc-hu
# GPLv2+
%{SAGE_DOC}/hu
%{SAGE_DOC}/output/html/hu
%{SAGE_DOC}/html/hu
#------------------------------------------------------------------------
%files doc-it
# GPLv2+
%{SAGE_DOC}/it
%{SAGE_DOC}/output/html/it
%{SAGE_DOC}/html/it
#------------------------------------------------------------------------
%files doc-pt
# GPLv2+
%{SAGE_DOC}/pt
%{SAGE_DOC}/output/html/pt
%{SAGE_DOC}/html/pt
#------------------------------------------------------------------------
%files doc-ru
# GPLv2+
%{SAGE_DOC}/ru
%{SAGE_DOC}/output/html/ru
%{SAGE_DOC}/html/ru
#------------------------------------------------------------------------
%files doc-tr
# GPLv2+
%{SAGE_DOC}/tr
%{SAGE_DOC}/output/html/tr
%{SAGE_DOC}/html/tr
# with docs
%endif
@ -1443,7 +1502,7 @@ exit 0
%{python_sitearch}/sagenb/data/jqueryui
# Public Domain
%{python_sitearch}/sagenb/data/json
# ASL 2.0
# Symbolic link to $_jsdir/mathjax
%{python_sitearch}/sagenb/data/mathjax
# Empty (do not run doctests flag file)
%{python_sitearch}/sagenb/data/nodoctest.py*
@ -1486,6 +1545,7 @@ exit 0
%lang(de_AT) %{python_sitearch}/sagenb/translations/fr_FR
%lang(pt_BR) %{python_sitearch}/sagenb/translations/pt_BR
%lang(ru_RU) %{python_sitearch}/sagenb/translations/ru_RU
%lang(uk_UA) %{python_sitearch}/sagenb/translations/uk_UA
#------------------------------------------------------------------------
%files rubiks
@ -1503,11 +1563,17 @@ exit 0
%files sagetex
# GPLv2+
%{python_sitearch}/sagetex*
%{_datadir}/texmf/tex/generic/sagetex
%doc %{_docdir}/%{sagetex_pkg}
%{_datadir}/texmf/tex/latex/sagetex
%doc %{_docdir}/sagetex
########################################################################
%changelog
* Sat Aug 20 2016 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 7.3-1
- Update to sagemath 7.3
- Switch from polybori to brial
- Default to use system pexpect
- Use system mathjax
* Fri Aug 12 2016 Jerry James <loganjerry@gmail.com> - 6.8-14
- Rebuild for fflas-ffpack 2.2.2, givaro 4.0.2, and linbox 1.4.2
- GAP packages atlasrep, design, and hap are now available

66
sig_includes.patch Normal file
View file

@ -0,0 +1,66 @@
Additions to includes
diff --git a/Cython/Includes/libc/setjmp.pxd b/Cython/Includes/libc/setjmp.pxd
index 74d1c59..f2283fe 100644
--- a/Cython/Includes/libc/setjmp.pxd
+++ b/Cython/Includes/libc/setjmp.pxd
@@ -3,3 +3,8 @@ cdef extern from "setjmp.h" nogil:
pass
int setjmp(jmp_buf state)
void longjmp(jmp_buf state, int value)
+
+ ctypedef struct sigjmp_buf:
+ pass
+ int sigsetjmp(sigjmp_buf state, int savesigs)
+ void siglongjmp(sigjmp_buf state, int value)
diff --git a/Cython/Includes/posix/select.pxd b/Cython/Includes/posix/select.pxd
new file mode 100644
index 0000000..37bc9d3
--- /dev/null
+++ b/Cython/Includes/posix/select.pxd
@@ -0,0 +1,19 @@
+from .types cimport sigset_t
+from .time cimport timeval, timespec
+
+cdef extern from "sys/select.h" nogil:
+ ctypedef struct fd_set:
+ pass
+
+ int FD_SETSIZE
+ void FD_SET(int, fd_set*)
+ void FD_CLR(int, fd_set*)
+ bint FD_ISSET(int, fd_set*)
+ void FD_ZERO(fd_set*)
+
+ int select(int nfds, fd_set *readfds, fd_set *writefds,
+ fd_set *exceptfds, const timeval *timeout)
+
+ int pselect(int nfds, fd_set *readfds, fd_set *writefds,
+ fd_set *exceptfds, const timespec *timeout,
+ const sigset_t *sigmask)
diff --git a/Cython/Includes/posix/signal.pxd b/Cython/Includes/posix/signal.pxd
index 9168b2f..2d6cce8 100644
--- a/Cython/Includes/posix/signal.pxd
+++ b/Cython/Includes/posix/signal.pxd
@@ -12,7 +12,7 @@ cdef extern from "signal.h" nogil:
int sigev_notify
int sigev_signo
sigval sigev_value
- void *sigev_notify_function(sigval)
+ void sigev_notify_function(sigval)
ctypedef struct siginfo_t:
int si_signo
@@ -26,10 +26,10 @@ cdef extern from "signal.h" nogil:
sigval si_value
cdef struct sigaction_t "sigaction":
- void *sa_handler(int)
+ void sa_handler(int)
+ void sa_sigaction(int, siginfo_t *, void *)
sigset_t sa_mask
int sa_flags
- void sa_sigaction(int, siginfo_t *, void *)
enum: SA_NOCLDSTOP
enum: SIG_BLOCK

View file

@ -1 +1 @@
661f2b2b13669c72d16ea8e6831125e4 sage-6.8.tar.gz
a289e955f9c94be3e4420ee86d8302a7 sage-7.3.tar.gz