Update to sagemath 6.1.1

This commit is contained in:
pcpa 2014-02-08 15:23:21 -02:00
parent d0a2caf3af
commit 34b5d7d380
30 changed files with 570 additions and 1598 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@
/sage-5.10.tar /sage-5.10.tar
/sage-5.12.tar /sage-5.12.tar
/sage-5.13.tar /sage-5.13.tar
/sage-6.1.1.tar.gz

View file

@ -1,120 +0,0 @@
# HG changeset patch
# User Jeroen Demeyer <jdemeyer@cage.ugent.be>
# Date 1366033527 -7200
# Node ID 3eaa1319e9e3bb9d65043524bd1fe6ada6242b8e
# Parent 6bafbfc4bdfe76b564e595f790902dda4c0df4c5
Upgrade Cython to 0.19
diff --git a/module_list.py b/module_list.py
--- a/module_list.py
+++ b/module_list.py
@@ -1867,8 +1867,12 @@
Extension('sage.structure.coerce_maps',
sources = ['sage/structure/coerce_maps.pyx']),
+ # Compile this with -Os because it works around a bug with
+ # GCC-4.7.3 + Cython 0.19 on Itanium, see Trac #14452. Moreover, it
+ # actually results in faster code than -O3.
Extension('sage.structure.element',
- sources = ['sage/structure/element.pyx']),
+ sources = ['sage/structure/element.pyx'],
+ extra_compile_args=["-Os"]),
Extension('sage.structure.factory',
sources = ['sage/structure/factory.pyx']),
diff --git a/sage/ext/cdefs.pxi b/sage/ext/cdefs.pxi
--- a/sage/ext/cdefs.pxi
+++ b/sage/ext/cdefs.pxi
@@ -7,13 +7,6 @@
from libc.stdio cimport *
from libc.string cimport strlen, strcpy, memset, memcpy
-from libc.math cimport sqrt
-# Cython misdeclares these: http://trac.cython.org/cython_trac/ticket/801
-cdef extern from "<math.h>":
- double frexp(double x, int* exponent)
- double ldexp(double x, int exponent)
-
+from libc.math cimport sqrt, frexp, ldexp
from sage.libs.gmp.all cimport *
-cdef extern from "<gmp.h>":
- pass # Cython bug sometimes includes this in the wrong place
diff --git a/sage/ext/gen_interpreters.py b/sage/ext/gen_interpreters.py
--- a/sage/ext/gen_interpreters.py
+++ b/sage/ext/gen_interpreters.py
@@ -2474,8 +2474,8 @@
}
"""
self.pxd_header = """
-# This is to work around a header ordering bug in Cython < 0.11
-# (Pari is included from sage.rings.complex_double.)
+# This is to work around a header incompatibility with PARI using
+# "I" as variable conflicting with the complex "I".
cdef extern from "pari/paricfg.h":
pass
cdef extern from "pari/pari.h":
diff --git a/sage/graphs/graph_decompositions/rankwidth.pyx b/sage/graphs/graph_decompositions/rankwidth.pyx
--- a/sage/graphs/graph_decompositions/rankwidth.pyx
+++ b/sage/graphs/graph_decompositions/rankwidth.pyx
@@ -205,7 +205,7 @@
# Actual computation
calculate_level(i)
- _sig_off
+ sig_off()
cdef int rank_width = <int> get_rw()
diff --git a/sage/misc/lazy_import.pyx b/sage/misc/lazy_import.pyx
--- a/sage/misc/lazy_import.pyx
+++ b/sage/misc/lazy_import.pyx
@@ -36,8 +36,7 @@
# http://www.gnu.org/licenses/
#*****************************************************************************
-cdef extern from *:
- cdef int Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE
+from cpython.object cimport Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE
import os, shutil, tempfile, cPickle as pickle, operator
import inspect
@@ -91,7 +90,9 @@
self._as_name = as_name
self._namespace = namespace
- cpdef _get_object(self, owner=None):
+ # Due to a bug in Cython-0.19, this must not be a cpdef method.
+ # See http://trac.sagemath.org/sage_trac/ticket/14452
+ def _get_object(self, owner=None):
"""
Return the wrapped object, importing it if necessary.
diff --git a/sage/modular/arithgroup/farey_symbol.pyx b/sage/modular/arithgroup/farey_symbol.pyx
--- a/sage/modular/arithgroup/farey_symbol.pyx
+++ b/sage/modular/arithgroup/farey_symbol.pyx
@@ -564,12 +564,3 @@
c = convert_to_Integer(M.c())
d = convert_to_Integer(M.d())
return SL2Z([a, b, c, d])
-
-# Use them to work around Cython bug forcing the unused
-# declarations to be emitted.
-cdef void _use_conversions():
- &convert_to_long
- &convert_to_Integer
- &convert_to_rational
- &convert_to_cusp
- &convert_to_SL2Z
diff --git a/sage/numerical/backends/ppl_backend.pyx b/sage/numerical/backends/ppl_backend.pyx
--- a/sage/numerical/backends/ppl_backend.pyx
+++ b/sage/numerical/backends/ppl_backend.pyx
@@ -612,7 +612,7 @@
"""
if name == NULL:
return self.name
- self.name = <str>name
+ self.name = str(<bytes>name)
cpdef row(self, int i):
"""

View file

@ -1,6 +1,6 @@
diff -up sage-5.13/spkg/build/sage-5.13/sage/sandpiles/sandpile.py.orig sage-5.13/spkg/build/sage-5.13/sage/sandpiles/sandpile.py diff -up src/sage/sandpiles/sandpile.py.orig src/sage/sandpiles/sandpile.py
--- sage-5.13/spkg/build/sage-5.13/sage/sandpiles/sandpile.py.orig 2014-01-28 16:01:55.841188856 -0200 --- src/sage/sandpiles/sandpile.py.orig 2014-01-28 16:01:55.841188856 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/sandpiles/sandpile.py 2014-01-28 16:02:07.914189318 -0200 +++ src/sage/sandpiles/sandpile.py 2014-01-28 16:02:07.914189318 -0200
@@ -24,8 +24,6 @@ packages. An alternative is to install @@ -24,8 +24,6 @@ packages. An alternative is to install
following variable to the correct path. following variable to the correct path.
""" """

View file

@ -1,12 +1,12 @@
diff -up sage-5.13/spkg/build/sage-5.13/module_list.py.orig sage-5.13/spkg/build/sage-5.13/module_list.py diff -up src/module_list.py.orig src/module_list.py
--- sage-5.13/spkg/build/sage-5.13/module_list.py.orig 2014-01-28 16:12:52.010213983 -0200 --- src/module_list.py.orig 2014-02-07 12:39:09.255844618 -0200
+++ sage-5.13/spkg/build/sage-5.13/module_list.py 2014-01-28 16:13:00.749214317 -0200 +++ src/module_list.py 2014-02-07 12:39:20.005845030 -0200
@@ -2097,7 +2097,7 @@ if (os.path.isfile(SAGE_INC + "/cplex.h" @@ -2114,7 +2114,7 @@ if (os.path.isfile(SAGE_INC + "/cplex.h"
libraries = ["csage", "stdc++", "cplex"]) libraries = ["csage", "stdc++", "cplex"])
) )
-if is_package_installed('cbc'): -if is_package_installed('cbc'):
+if 1: +if 1:
ext_modules.append( ext_modules.append(
Extension("sage.numerical.backends.coin_backend", Extension("sage.numerical.backends.coin_backend",
["sage/numerical/backends/coin_backend.pyx"], ["sage/numerical/backends/coin_backend.pyx"],

View file

@ -1,7 +1,7 @@
diff -up sage-5.13/spkg/build/sage-5.13/sage/databases/cremona.py.orig sage-5.13/spkg/build/sage-5.13/sage/databases/cremona.py diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py
--- sage-5.13/spkg/build/sage-5.13/sage/databases/cremona.py.orig 2013-02-22 17:33:50.579875129 -0300 --- src/sage/databases/cremona.py.orig 2014-02-07 12:35:15.971835685 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/databases/cremona.py 2013-02-22 17:34:05.051875683 -0300 +++ src/sage/databases/cremona.py 2014-02-07 12:35:25.242836040 -0200
@@ -889,14 +889,9 @@ class MiniCremonaDatabase(SQLDatabase): @@ -886,14 +886,9 @@ class MiniCremonaDatabase(SQLDatabase):
if N < self.largest_conductor(): if N < self.largest_conductor():
message = "There is no elliptic curve with label " + label \ message = "There is no elliptic curve with label " + label \
+ " in the database" + " in the database"
@ -17,7 +17,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/databases/cremona.py.orig sage-5.13
raise ValueError(message) raise ValueError(message)
def iter(self, conductors): def iter(self, conductors):
@@ -1594,10 +1589,12 @@ def CremonaDatabase(name=None,mini=None, @@ -1591,10 +1586,12 @@ def CremonaDatabase(name=None,mini=None,
if name is None and not set_global: if name is None and not set_global:
return _db return _db
if set_global and name is None: if set_global and name is None:

View file

@ -1,7 +1,7 @@
diff -up sage-5.13/spkg/build/sage-5.13/module_list.py.orig sage-5.13/spkg/build/sage-5.13/module_list.py diff -up src/module_list.py.orig src/module_list.py
--- sage-5.13/spkg/build/sage-5.13/module_list.py.orig 2014-01-28 16:20:58.178232600 -0200 --- src/module_list.py.orig 2014-02-07 12:47:06.312862886 -0200
+++ sage-5.13/spkg/build/sage-5.13/module_list.py 2014-01-28 16:21:11.779233120 -0200 +++ src/module_list.py 2014-02-07 12:49:07.920867543 -0200
@@ -2107,7 +2107,7 @@ if is_package_installed('cbc'): @@ -2124,7 +2124,7 @@ if is_package_installed('cbc'):
) )

View file

@ -1,18 +1,18 @@
diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/ecl.pxd.orig sage-5.13/spkg/build/sage-5.13/sage/libs/ecl.pxd diff -up src/sage/libs/ecl.pxd.orig src/sage/libs/ecl.pxd
--- sage-5.13/spkg/build/sage-5.13/sage/libs/ecl.pxd.orig 2014-01-28 16:00:06.455184667 -0200 --- src/sage/libs/ecl.pxd.orig 2014-02-07 11:44:51.152719854 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/libs/ecl.pxd 2014-01-28 16:00:17.705185098 -0200 +++ src/sage/libs/ecl.pxd 2014-02-07 11:45:08.969720536 -0200
@@ -133,6 +133,7 @@ cdef extern from "ecl/ecl.h": @@ -134,6 +134,7 @@ cdef extern from "ecl/ecl.h":
cl_object ecl_read_from_cstring_safe(char *s, cl_object err) cl_object ecl_read_from_cstring_safe(char *s, cl_object err)
cl_object cl_write_to_string(cl_narg narg, cl_object o) cl_object cl_write_to_string(cl_narg narg, cl_object o)
cl_object ecl_cstring_to_base_string_or_nil(char *s) cl_object ecl_cstring_to_base_string_or_nil(char *s)
+ cl_object si_coerce_to_base_string(cl_object x) + cl_object si_coerce_to_base_string(cl_object x)
# S-expr evaluation and function calls # S-expr evaluation and function calls
diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/ecl.pyx.orig sage-5.13/spkg/build/sage-5.13/sage/libs/ecl.pyx diff -up src/sage/libs/ecl.pyx.orig src/sage/libs/ecl.pyx
--- sage-5.13/spkg/build/sage-5.13/sage/libs/ecl.pyx.orig 2014-01-28 15:59:57.900184339 -0200 --- src/sage/libs/ecl.pyx.orig 2014-02-07 11:45:20.327720971 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/libs/ecl.pyx 2014-01-28 16:00:17.707185098 -0200 +++ src/sage/libs/ecl.pyx 2014-02-07 11:48:28.278728169 -0200
@@ -236,17 +236,19 @@ cdef cl_object ecl_safe_eval(cl_object f @@ -329,17 +329,19 @@ cdef cl_object ecl_safe_eval(cl_object f
... ...
RuntimeError: ECL says: Console interrupt. RuntimeError: ECL says: Console interrupt.
""" """
@ -34,7 +34,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/ecl.pyx.orig sage-5.13/spkg/bu
l = cl_cons(func,cl_cons(arg,Cnil)); l = cl_cons(func,cl_cons(arg,Cnil));
ecl_sig_on() ecl_sig_on()
@@ -254,17 +256,20 @@ cdef cl_object ecl_safe_funcall(cl_objec @@ -347,17 +349,20 @@ cdef cl_object ecl_safe_funcall(cl_objec
ecl_sig_off() ecl_sig_off()
if ecl_nvalues > 1: if ecl_nvalues > 1:
@ -57,10 +57,10 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/ecl.pyx.orig sage-5.13/spkg/bu
else: else:
return ecl_values(0) return ecl_values(0)
@@ -314,10 +319,11 @@ def print_objects(): @@ -407,10 +412,11 @@ def print_objects():
HELLO HELLO
""" """
- cdef cl_object c - cdef cl_object c
+ cdef cl_object c, s + cdef cl_object c, s
c = list_of_objects c = list_of_objects
@ -71,7 +71,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/ecl.pyx.orig sage-5.13/spkg/bu
c=cl_cadr(c) c=cl_cadr(c)
if c == Cnil: if c == Cnil:
break break
@@ -392,6 +398,7 @@ cdef cl_object python_to_ecl(pyobj) exce @@ -485,6 +491,7 @@ cdef cl_object python_to_ecl(pyobj) exce
raise TypeError,"Unimplemented type for python_to_ecl" raise TypeError,"Unimplemented type for python_to_ecl"
cdef ecl_to_python(cl_object o): cdef ecl_to_python(cl_object o):
@ -79,7 +79,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/ecl.pyx.orig sage-5.13/spkg/bu
cdef Integer N cdef Integer N
# conversions from an ecl object to a python object. # conversions from an ecl object to a python object.
@@ -426,7 +433,8 @@ cdef ecl_to_python(cl_object o): @@ -519,7 +526,8 @@ cdef ecl_to_python(cl_object o):
return tuple(L) return tuple(L)
return L return L
else: else:
@ -89,12 +89,3 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/ecl.pyx.orig sage-5.13/spkg/bu
#Maxima's BFLOAT multiprecision float type can be read with: #Maxima's BFLOAT multiprecision float type can be read with:
#def bfloat_to_python(e): #def bfloat_to_python(e):
@@ -642,7 +650,7 @@ cdef class EclObject:
"""
cdef cl_object s
- s = cl_write_to_string(1,self.obj)
+ s = si_coerce_to_base_string(cl_write_to_string(1,self.obj))
return ecl_base_string_pointer_safe(s)
def __hash__(self):

View file

@ -1,7 +1,7 @@
diff -up sage-5.13/spkg/build/sage-5.13/module_list.py.orig sage-5.13/spkg/build/sage-5.13/module_list.py diff -up src/module_list.py.orig src/module_list.py
--- sage-5.13/spkg/build/sage-5.13/module_list.py.orig 2014-01-28 15:56:04.699175409 -0200 --- src/module_list.py.orig 2014-02-07 11:27:41.862680439 -0200
+++ sage-5.13/spkg/build/sage-5.13/module_list.py 2014-01-28 15:56:14.210175773 -0200 +++ src/module_list.py 2014-02-07 11:27:58.536681078 -0200
@@ -2052,7 +2052,8 @@ ext_modules = [ @@ -2069,7 +2069,8 @@ ext_modules = [
# These extensions are to be compiled only if the # These extensions are to be compiled only if the
# corresponding packages have been installed # corresponding packages have been installed

View file

@ -1,7 +1,7 @@
diff -up sage-5.13/spkg/build/sage-5.13/module_list.py.orig sage-5.13/spkg/build/sage-5.13/module_list.py diff -up src/module_list.py.orig src/module_list.py
--- sage-5.13/spkg/build/sage-5.13/module_list.py.orig 2014-01-28 16:14:01.061216627 -0200 --- src/module_list.py.orig 2014-02-07 12:46:14.237860892 -0200
+++ sage-5.13/spkg/build/sage-5.13/module_list.py 2014-01-28 16:14:03.961216738 -0200 +++ src/module_list.py 2014-02-07 12:46:18.226861045 -0200
@@ -2056,7 +2056,7 @@ ext_modules = [ @@ -2073,7 +2073,7 @@ ext_modules = [
def is_package_installed(name): def is_package_installed(name):
return False return False

View file

@ -1,6 +1,6 @@
diff -up sage-5.13/spkg/build/sage-5.13/sage/groups/perm_gps/permgroup.py.orig sage-5.13/spkg/build/sage-5.13/sage/groups/perm_gps/permgroup.py diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/permgroup.py
--- sage-5.13/spkg/build/sage-5.13/sage/groups/perm_gps/permgroup.py.orig 2013-10-16 12:10:08.670199063 -0300 --- src/sage/groups/perm_gps/permgroup.py.orig 2014-02-07 12:37:33.523840952 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/groups/perm_gps/permgroup.py 2013-10-16 12:10:21.342199548 -0300 +++ src/sage/groups/perm_gps/permgroup.py 2014-02-07 12:37:42.905841312 -0200
@@ -180,8 +180,7 @@ def hap_decorator(f): @@ -180,8 +180,7 @@ def hap_decorator(f):
""" """
@wraps(f) @wraps(f)
@ -11,7 +11,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/groups/perm_gps/permgroup.py.orig s
load_hap() load_hap()
from sage.rings.arith import is_prime from sage.rings.arith import is_prime
if not (p == 0 or is_prime(p)): if not (p == 0 or is_prime(p)):
@@ -3865,8 +3864,7 @@ class PermutationGroup_generic(group.Gro @@ -3934,8 +3933,7 @@ class PermutationGroup_generic(group.Gro
- David Joyner and Graham Ellis - David Joyner and Graham Ellis
""" """

View file

@ -1,6 +1,6 @@
diff -up sage-5.13/spkg/build/sage-5.13/c_lib/src/memory.c.orig sage-5.13/spkg/build/sage-5.13/c_lib/src/memory.c diff -up src/c_lib/src/memory.c.orig src/c_lib/src/memory.c
--- sage-5.13/spkg/build/sage-5.13/c_lib/src/memory.c.orig 2014-01-28 15:45:05.920150182 -0200 --- src/c_lib/src/memory.c.orig 2014-02-07 11:01:49.674621000 -0200
+++ sage-5.13/spkg/build/sage-5.13/c_lib/src/memory.c 2014-01-28 15:45:14.225150500 -0200 +++ src/c_lib/src/memory.c 2014-02-07 11:02:02.046621474 -0200
@@ -18,7 +18,7 @@ AUTHORS: @@ -18,7 +18,7 @@ AUTHORS:
****************************************************************************/ ****************************************************************************/
@ -10,3 +10,22 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/src/memory.c.orig sage-5.13/spkg/b
#include "interrupt.h" #include "interrupt.h"
#include "memory.h" #include "memory.h"
diff -up src/sage/modular/arithgroup/farey.cpp.orig src/sage/modular/arithgroup/farey.cpp
--- src/sage/modular/arithgroup/farey.cpp.orig 2014-02-07 16:44:24.474408115 -0200
+++ src/sage/modular/arithgroup/farey.cpp 2014-02-07 16:44:33.100408446 -0200
@@ -141,6 +141,7 @@ operator*(const SL2Z& M, const vector<mp
return result;
}
+#if 0
inline
mpz_class
floor(const mpq_class r) {
@@ -151,6 +152,7 @@ floor(const mpq_class r) {
return result - 1;
}
}
+#endif
inline
mpz_class lcm(const mpz_class& a, const mpz_class& b) {

View file

@ -1,7 +1,7 @@
diff -up sage-5.13/spkg/build/sage-5.13/sage/interfaces/jmoldata.py.orig sage-5.13/spkg/build/sage-5.13/sage/interfaces/jmoldata.py diff -up src/sage/interfaces/jmoldata.py.orig src/sage/interfaces/jmoldata.py
--- sage-5.13/spkg/build/sage-5.13/sage/interfaces/jmoldata.py.orig 2012-11-10 12:03:07.742817945 -0200 --- src/sage/interfaces/jmoldata.py.orig 2014-02-07 12:31:50.599827821 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/interfaces/jmoldata.py 2012-11-10 12:03:34.499818970 -0200 +++ src/sage/interfaces/jmoldata.py 2014-02-07 12:34:31.334833976 -0200
@@ -86,7 +86,7 @@ class JmolData(SageObject): @@ -64,7 +64,7 @@ class JmolData(SageObject):
sage_makedirs(jmolscratch) sage_makedirs(jmolscratch)
scratchout = os.path.join(jmolscratch,"jmolout.txt") scratchout = os.path.join(jmolscratch,"jmolout.txt")
jout=open(scratchout,'w') jout=open(scratchout,'w')
@ -10,21 +10,24 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/interfaces/jmoldata.py.orig sage-5.
result = subprocess.call([testjavapath],stdout=jout) result = subprocess.call([testjavapath],stdout=jout)
jout.close() jout.close()
if (result == 0): if (result == 0):
@@ -167,8 +167,6 @@ class JmolData(SageObject): @@ -144,8 +144,6 @@ class JmolData(SageObject):
True
""" """
if (self.is_jvm_available()): - # Set up paths, file names and scripts
- # Set up paths, file names and scripts - jmolpath = os.path.join(SAGE_LOCAL, "share", "jmol", "JmolData.jar")
- jmolpath = os.path.join(SAGE_LOCAL, "share", "jmol", "JmolData.jar") launchscript = ""
launchscript = "" if (datafile_cmd!='script'):
if (datafile_cmd!='script'): launchscript = "load "
launchscript = "load " @@ -157,9 +155,8 @@ class JmolData(SageObject):
@@ -185,7 +183,7 @@ class JmolData(SageObject): scratchout = tmp_filename(ext=".txt")
scratchout = os.path.join(jmolscratch,"jmolout.txt") with open(scratchout, 'w') as jout:
jout=open(scratchout,'w') # Now call the java application and write the file.
#now call the java application and write the file. - subprocess.call(["java", "-Xmx512m", "-Djava.awt.headless=true",
- result = subprocess.call(["java","-Xmx512m","-Djava.awt.headless=true","-jar",jmolpath,"-iox","-g",sizeStr,"-J",launchscript,"-j",imagescript],stdout=jout) - "-jar", jmolpath, "-iox", "-g", sizeStr,
+ result = subprocess.call(["jmol","-n","-g",sizeStr,"-J",launchscript,"-j",imagescript],stdout=jout) - "-J", launchscript, "-j", imagescript], stdout=jout, stderr=jout)
jout.close() + subprocess.call(["jmol","-n","-g",sizeStr,
else: + "-J",launchscript,"-j",imagescript],stdout=jout)
errStr = "Java Virtual Machine not available.\n" if not os.path.isfile(targetfile):
raise RuntimeError("Jmol failed to create file %s, see %s for details"%(repr(targetfile), repr(scratchout)))
os.unlink(scratchout)

View file

@ -1,8 +1,8 @@
diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/gap/util.pyx.orig sage-5.13/spkg/build/sage-5.13/sage/libs/gap/util.pyx diff -up src/sage/libs/gap/util.pyx.orig src/sage/libs/gap/util.pyx
--- sage-5.13/spkg/build/sage-5.13/sage/libs/gap/util.pyx.orig 2013-05-06 14:24:03.160826749 -0300 --- src/sage/libs/gap/util.pyx.orig 2014-02-07 12:44:48.769857619 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/libs/gap/util.pyx 2013-05-06 14:25:25.806829913 -0300 +++ src/sage/libs/gap/util.pyx 2014-02-07 12:45:27.743859112 -0200
@@ -155,18 +155,9 @@ def gap_root(): @@ -155,18 +155,9 @@ def gap_root():
sage: from sage.libs.gap.util import gap_root sage: from sage.libs.gap.util import gap_root
sage: gap_root() # random output sage: gap_root() # random output
- '/home/vbraun/opt/sage-5.3.rc0/local/gap/latest' - '/home/vbraun/opt/sage-5.3.rc0/local/gap/latest'
@ -19,6 +19,6 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/gap/util.pyx.orig sage-5.13/sp
- gapdir = gapdir.replace('$SAGE_LOCAL', SAGE_LOCAL) - gapdir = gapdir.replace('$SAGE_LOCAL', SAGE_LOCAL)
- return gapdir - return gapdir
+ return '/usr/lib/gap' + return '/usr/lib/gap'
cdef initialize(): cdef initialize():

View file

@ -1,7 +1,7 @@
diff -up sage-5.13/spkg/build/sage-5.13/module_list.py.orig sage-5.13/spkg/build/sage-5.13/module_list.py diff -up src/module_list.py.orig src/module_list.py
--- sage-5.13/spkg/build/sage-5.13/module_list.py.orig 2014-01-28 16:12:03.635212130 -0200 --- src/module_list.py.orig 2014-02-07 12:38:18.873842689 -0200
+++ sage-5.13/spkg/build/sage-5.13/module_list.py 2014-01-28 16:12:12.674212476 -0200 +++ src/module_list.py 2014-02-07 12:38:27.546843021 -0200
@@ -2132,7 +2132,7 @@ if UNAME[0] == "Darwin" and not UNAME[2] @@ -2149,7 +2149,7 @@ if UNAME[0] == "Darwin" and not UNAME[2]
) )

View file

@ -1,7 +1,7 @@
diff -up sage-5.13/spkg/build/sage-5.13/sage/geometry/polyhedron/base.py.orig sage-5.13/spkg/build/sage-5.13/sage/geometry/polyhedron/base.py diff -up src/sage/geometry/polyhedron/base.py.orig src/sage/geometry/polyhedron/base.py
--- sage-5.13/spkg/build/sage-5.13/sage/geometry/polyhedron/base.py.orig 2013-10-16 12:08:54.546196224 -0300 --- src/sage/geometry/polyhedron/base.py.orig 2014-02-07 12:36:06.514837620 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/geometry/polyhedron/base.py 2013-10-16 12:09:04.060196589 -0300 +++ src/sage/geometry/polyhedron/base.py 2014-02-07 12:36:16.918838019 -0200
@@ -3291,11 +3291,6 @@ class Polyhedron_base(Element): @@ -3406,11 +3406,6 @@ class Polyhedron_base(Element):
David Avis's lrs program. David Avis's lrs program.
""" """

View file

@ -1,28 +1,6 @@
diff -up sage-5.13/spkg/build/sage-5.13/sage/interfaces/maxima.py.orig sage-5.13/spkg/build/sage-5.13/sage/interfaces/maxima.py diff -up src/bin/sage-maxima.lisp.orig src/bin/sage-maxima.lisp
--- sage-5.13/spkg/build/sage-5.13/sage/interfaces/maxima.py.orig 2013-07-29 19:54:04.395052544 -0300 --- src/bin/sage-maxima.lisp.orig 2014-02-07 11:52:01.751736343 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/interfaces/maxima.py 2013-07-29 19:55:18.259055373 -0300 +++ src/bin/sage-maxima.lisp 2014-02-07 11:52:17.429736944 -0200
@@ -544,7 +544,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,
@@ -591,7 +591,8 @@ class Maxima(MaximaAbstract, Expect):
# Remove limit on the max heapsize (since otherwise it defaults
# to 256MB with ECL).
- self._sendline(":lisp (ext:set-limit 'ext:heap-size 0)")
+ self._sendline(":lisp #+ecl (ext:set-limit 'ext:heap-size 0) #-ecl 0")
+ self._sendline(':lisp #+gcl (progn (si:readline-off) (setf *error-output* (open "/dev/stderr" :direction :output) *standard-input* (open "/dev/stdin" :direction :input) *standard-output* (open "/dev/stdout" :direction :output))) #-gcl t')
self._eval_line('0;')
def __reduce__(self):
diff -up sage-5.13/spkg/build/sage_scripts-5.13/sage-maxima.lisp.orig sage-5.13/spkg/build/sage_scripts-5.13/sage-maxima.lisp
--- sage-5.13/spkg/build/sage_scripts-5.13/sage-maxima.lisp.orig 2013-07-29 19:54:04.402052544 -0300
+++ sage-5.13/spkg/build/sage_scripts-5.13/sage-maxima.lisp 2013-07-29 19:55:33.867055970 -0300
@@ -3,4 +3,8 @@ @@ -3,4 +3,8 @@
;(setf *general-display-prefix* "<sage-display>") ;(setf *general-display-prefix* "<sage-display>")
@ -33,3 +11,25 @@ diff -up sage-5.13/spkg/build/sage_scripts-5.13/sage-maxima.lisp.orig sage-5.13/
+ *error-output* (open "/dev/stderr" :direction :output) + *error-output* (open "/dev/stderr" :direction :output)
+ *standard-input* (open "/dev/stdin" :direction :input) + *standard-input* (open "/dev/stdin" :direction :input)
+ *standard-output* (open "/dev/stdout" :direction :output)) + *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 2014-02-07 11:50:56.989733863 -0200
+++ src/sage/interfaces/maxima.py 2014-02-07 11:51:45.174735709 -0200
@@ -544,7 +544,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,
@@ -593,7 +593,8 @@ class Maxima(MaximaAbstract, Expect):
# Remove limit on the max heapsize (since otherwise it defaults
# to 256MB with ECL).
- self._sendline(":lisp (ext:set-limit 'ext:heap-size 0)")
+ self._sendline(":lisp #+ecl (ext:set-limit 'ext:heap-size 0) #-ecl 0")
+ self._sendline(':lisp #+gcl (progn (si:readline-off) (setf *error-output* (open "/dev/stderr" :direction :output) *standard-input* (open "/dev/stdin" :direction :input) *standard-output* (open "/dev/stdout" :direction :output))) #-gcl t')
self._eval_line('0;')
def __reduce__(self):

View file

@ -1,7 +1,7 @@
diff -up sage-5.13/spkg/build/sage-5.13/sage/graphs/graph_generators.py.orig sage-5.13/spkg/build/sage-5.13/sage/graphs/graph_generators.py diff -up src/sage/graphs/graph_generators.py.orig src/sage/graphs/graph_generators.py
--- sage-5.13/spkg/build/sage-5.13/sage/graphs/graph_generators.py.orig 2014-01-28 16:10:40.018208928 -0200 --- src/sage/graphs/graph_generators.py.orig 2014-02-07 12:36:49.882839281 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/graphs/graph_generators.py 2014-01-28 16:10:49.569209294 -0200 +++ src/sage/graphs/graph_generators.py 2014-02-07 12:37:01.793839737 -0200
@@ -810,7 +810,7 @@ class GraphGenerators(): @@ -823,7 +823,7 @@ class GraphGenerators():
""" """
import subprocess import subprocess
from sage.misc.package import is_package_installed from sage.misc.package import is_package_installed

View file

@ -1,6 +1,6 @@
diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/pari/decl.pxi.orig sage-5.13/spkg/build/sage-5.13/sage/libs/pari/decl.pxi diff -up src/sage/libs/pari/decl.pxi.orig src/sage/libs/pari/decl.pxi
--- sage-5.13/spkg/build/sage-5.13/sage/libs/pari/decl.pxi.orig 2014-01-28 16:15:59.591221166 -0200 --- src/sage/libs/pari/decl.pxi.orig 2014-02-07 12:47:51.412864613 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/libs/pari/decl.pxi 2014-01-28 16:16:06.331221424 -0200 +++ src/sage/libs/pari/decl.pxi 2014-02-07 12:48:00.616864966 -0200
@@ -869,7 +869,6 @@ cdef extern from 'pari/pari.h': @@ -869,7 +869,6 @@ cdef extern from 'pari/pari.h':
GEN polredabs0(GEN x, long flag) GEN polredabs0(GEN x, long flag)
GEN polredabs2(GEN x) GEN polredabs2(GEN x)
@ -9,17 +9,17 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/pari/decl.pxi.orig sage-5.13/s
GEN qflll0(GEN x, long flag) GEN qflll0(GEN x, long flag)
GEN qflllgram0(GEN x, long flag) GEN qflllgram0(GEN x, long flag)
GEN smallpolred(GEN x) GEN smallpolred(GEN x)
diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/pari/gen.pyx.orig sage-5.13/spkg/build/sage-5.13/sage/libs/pari/gen.pyx diff -up src/sage/libs/pari/gen.pyx.orig src/sage/libs/pari/gen.pyx
--- sage-5.13/spkg/build/sage-5.13/sage/libs/pari/gen.pyx.orig 2014-01-28 16:16:21.446222003 -0200 --- src/sage/libs/pari/gen.pyx.orig 2014-02-07 12:48:07.252865220 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/libs/pari/gen.pyx 2014-01-28 16:16:33.024222446 -0200 +++ src/sage/libs/pari/gen.pyx 2014-02-07 12:48:21.513865766 -0200
@@ -8087,10 +8087,6 @@ cdef class gen(sage.structure.element.Ri @@ -7885,10 +7885,6 @@ cdef class gen(sage.structure.element.Ri
pari_catch_sig_on() pari_catch_sig_on()
return P.new_gen(polredabs0(self.g, flag)) return P.new_gen(polredabs0(self.g, flag))
- def polredbest(self, flag=0): - def polredbest(self, long flag=0):
- pari_catch_sig_on() - pari_catch_sig_on()
- return P.new_gen(polredbest(self.g, flag)) - return P.new_gen(polredbest(self.g, flag))
- -
def polresultant(self, y, var=-1, flag=0): def polresultant(self, y, var=-1, long flag=0):
cdef gen t0 = objtogen(y) cdef gen t0 = objtogen(y)
pari_catch_sig_on() pari_catch_sig_on()

View file

@ -1,6 +1,6 @@
diff -up sage-5.13/spkg/build/sage-5.13/c_lib/include/ntl_wrap.h.orig sage-5.13/spkg/build/sage-5.13/c_lib/include/ntl_wrap.h diff -up src/c_lib/include/ntl_wrap.h.orig src/c_lib/include/ntl_wrap.h
--- sage-5.13/spkg/build/sage-5.13/c_lib/include/ntl_wrap.h.orig 2013-07-29 19:40:07.189020485 -0300 --- src/c_lib/include/ntl_wrap.h.orig 2014-02-07 15:20:57.081216365 -0200
+++ sage-5.13/spkg/build/sage-5.13/c_lib/include/ntl_wrap.h 2013-07-29 19:40:11.831020662 -0300 +++ src/c_lib/include/ntl_wrap.h 2014-02-07 15:21:04.225216638 -0200
@@ -40,91 +40,92 @@ EXTERN void setup_NTL_error_callback(voi @@ -40,91 +40,92 @@ EXTERN void setup_NTL_error_callback(voi
//////// ZZ ////////// //////// ZZ //////////
@ -298,12 +298,12 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/include/ntl_wrap.h.orig sage-5.13/
//////// zz_pX ////////// //////// zz_pX //////////
#ifndef __cplusplus #ifndef __cplusplus
-struct zz_pX; -struct zz_pX;
+typedef struct zz_pX zz_pX; +typedef struct ZZ_pX ZZ_pX;
#endif #endif
#define NTL_zz_pX_DOUBLE_EQUALS( obj1, obj2 )\ #define NTL_zz_pX_DOUBLE_EQUALS( obj1, obj2 )\
@@ -225,104 +227,106 @@ struct zz_pX; @@ -225,64 +227,63 @@ struct zz_pX;
//////// ZZ_pEContext /////////////// //////// ZZ_pEContext ///////////////
#ifndef __cplusplus #ifndef __cplusplus
@ -336,7 +336,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/include/ntl_wrap.h.orig sage-5.13/
#endif #endif
//////// mat_ZZ ////////// //////// mat_ZZ //////////
-
#ifndef __cplusplus #ifndef __cplusplus
-struct mat_ZZ; -struct mat_ZZ;
+typedef struct mat_ZZ mat_ZZ; +typedef struct mat_ZZ mat_ZZ;
@ -397,11 +397,8 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/include/ntl_wrap.h.orig sage-5.13/
+typedef struct ZZ_pE ZZ_pE; +typedef struct ZZ_pE ZZ_pE;
#endif #endif
-// EXTERN struct ZZ_pE* new_ZZ_pE // EXTERN struct ZZ_pE* new_ZZ_pE
+// EXTERN ZZ_pE* new_ZZ_pE @@ -292,37 +293,40 @@ struct ZZ_pE;
//////// ZZ_pEX ////////// //////// ZZ_pEX //////////
//#ifndef __cplusplus //#ifndef __cplusplus
@ -425,10 +422,11 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/include/ntl_wrap.h.orig sage-5.13/
+typedef struct GF2E GF2E; +typedef struct GF2E GF2E;
+typedef struct GF2EContext GF2EContext; +typedef struct GF2EContext GF2EContext;
#endif #endif
+typedef GF2X GF2X_c;
-EXTERN struct GF2EContext* GF2EContext_new(struct GF2X_c* p); -EXTERN struct GF2EContext* GF2EContext_new(struct GF2X_c* p);
-EXTERN struct GF2EContext* GF2EContext_construct(void *mem, const struct GF2X *p); -EXTERN struct GF2EContext* GF2EContext_construct(void *mem, const struct GF2X *p);
+EXTERN GF2EContext* GF2EContext_new(GF2X* p); +EXTERN GF2EContext* GF2EContext_new(GF2X_c* p);
+EXTERN GF2EContext* GF2EContext_construct(void *mem, const GF2X *p); +EXTERN GF2EContext* GF2EContext_construct(void *mem, const GF2X *p);
//////// mat_GF2E ////////// //////// mat_GF2E //////////
@ -451,757 +449,10 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/include/ntl_wrap.h.orig sage-5.13/
-EXTERN void mat_GF2_setitem(struct mat_GF2* x, int i, int j, const struct GF2* z); -EXTERN void mat_GF2_setitem(struct mat_GF2* x, int i, int j, const struct GF2* z);
+EXTERN void mat_GF2_setitem(mat_GF2* x, int i, int j, const GF2* z); +EXTERN void mat_GF2_setitem(mat_GF2* x, int i, int j, const GF2* z);
diff -up sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp.orig sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp diff -up src/c_lib/src/ntl_wrap.cpp.orig src/c_lib/src/ntl_wrap.cpp
--- sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp.orig 2013-07-29 19:40:07.197020485 -0300 --- src/c_lib/src/ntl_wrap.cpp.orig 2014-02-07 15:20:57.085216365 -0200
+++ sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp 2013-07-29 19:40:11.834020662 -0300 +++ src/c_lib/src/ntl_wrap.cpp 2014-02-07 15:21:07.322216757 -0200
@@ -29,7 +29,7 @@ int ZZ_to_int(const ZZ* x) @@ -845,67 +845,67 @@ struct ZZ_pX ZZ_pE_to_ZZ_pX(struct ZZ_pE
/* Returns a *new* ZZ object.
AUTHOR: David Harvey (2008-06-08) */
-struct ZZ* int_to_ZZ(int value)
+ZZ* int_to_ZZ(int value)
{
ZZ* output = new ZZ();
conv(*output, value);
@@ -40,7 +40,7 @@ struct ZZ* int_to_ZZ(int value)
Assumes output has been mpz_init'd.
AUTHOR: David Harvey
Joel B. Mohler moved the ZZX_getitem_as_mpz code out to this function (2007-03-13) */
-void ZZ_to_mpz(mpz_t* output, const struct ZZ* x)
+void ZZ_to_mpz(mpz_t* output, const ZZ* x)
{
unsigned char stack_bytes[4096];
int use_heap;
@@ -62,7 +62,7 @@ void ZZ_to_mpz(mpz_t* output, const stru
/* Copies the mpz_t into the ZZ
AUTHOR: Joel B. Mohler (2007-03-15) */
// This should be changed to an mpz_t not an mpz_t*
-void mpz_to_ZZ(struct ZZ* output, const mpz_t *x)
+void mpz_to_ZZ(ZZ* output, const mpz_t *x)
{
unsigned char stack_bytes[4096];
int use_heap;
@@ -86,7 +86,7 @@ void ZZ_set_from_int(ZZ* x, int value)
conv(*x, value);
}
-long ZZ_remove(struct ZZ &dest, const struct ZZ &src, const struct ZZ &f)
+long ZZ_remove(ZZ &dest, const ZZ &src, const ZZ &f)
{
// Based on the code for mpz_remove
ZZ fpow[40]; // inexaustible...until year 2020 or so
@@ -172,12 +172,12 @@ void ZZ_p_set_from_int(ZZ_p* x, int valu
conv(*x, value);
}
-void ZZ_p_modulus(struct ZZ* mod, const struct ZZ_p* x)
+void ZZ_p_modulus(ZZ* mod, const ZZ_p* x)
{
(*mod) = x->modulus();
}
-struct ZZ_p* ZZ_p_pow(const struct ZZ_p* x, long e)
+ZZ_p* ZZ_p_pow(const ZZ_p* x, long e)
{
ZZ_p *z = new ZZ_p();
power(*z, *x, e);
@@ -203,7 +203,7 @@ ZZ_p* ZZ_p_random(void)
return z;
}
-struct ZZ_p* ZZ_p_neg(struct ZZ_p* x)
+ZZ_p* ZZ_p_neg(ZZ_p* x)
{
return new ZZ_p(-(*x));
}
@@ -214,7 +214,7 @@ struct ZZ_p* ZZ_p_neg(struct ZZ_p* x)
//////// ZZX //////////
///////////////////////////////////////////////
-char* ZZX_repr(struct ZZX* x)
+char* ZZX_repr(ZZX* x)
{
ostringstream instore;
instore << (*x);
@@ -224,13 +224,13 @@ char* ZZX_repr(struct ZZX* x)
return buf;
}
-struct ZZX* ZZX_copy(struct ZZX* x) {
+ZZX* ZZX_copy(ZZX* x) {
return new ZZX(*x);
}
/* Sets ith coefficient of x to value.
AUTHOR: David Harvey (2006-06-08) */
-void ZZX_setitem_from_int(struct ZZX* x, long i, int value)
+void ZZX_setitem_from_int(ZZX* x, long i, int value)
{
SetCoeff(*x, i, value);
}
@@ -238,7 +238,7 @@ void ZZX_setitem_from_int(struct ZZX* x,
/* Returns ith coefficient of x.
Return value is only valid if the result should fit into an int.
AUTHOR: David Harvey (2006-06-08) */
-int ZZX_getitem_as_int(struct ZZX* x, long i)
+int ZZX_getitem_as_int(ZZX* x, long i)
{
return ZZ_to_int(&coeff(*x, i));
}
@@ -246,75 +246,75 @@ int ZZX_getitem_as_int(struct ZZX* x, lo
/* Copies ith coefficient of x to output.
Assumes output has been mpz_init'd.
AUTHOR: David Harvey (2007-02) */
-void ZZX_getitem_as_mpz(mpz_t* output, struct ZZX* x, long i)
+void ZZX_getitem_as_mpz(mpz_t* output, ZZX* x, long i)
{
const ZZ& z = coeff(*x, i);
ZZ_to_mpz(output, &z);
}
-struct ZZX* ZZX_div(struct ZZX* x, struct ZZX* y, int* divisible)
+ZZX* ZZX_div(ZZX* x, ZZX* y, int* divisible)
{
- struct ZZX* z = new ZZX();
+ ZZX* z = new ZZX();
*divisible = divide(*z, *x, *y);
return z;
}
-void ZZX_quo_rem(struct ZZX* x, struct ZZX* other, struct ZZX** r, struct ZZX** q)
+void ZZX_quo_rem(ZZX* x, ZZX* other, ZZX** r, ZZX** q)
{
- struct ZZX *qq = new ZZX(), *rr = new ZZX();
+ ZZX *qq = new ZZX(), *rr = new ZZX();
DivRem(*qq, *rr, *x, *other);
*r = rr; *q = qq;
}
-struct ZZX* ZZX_square(struct ZZX* x)
+ZZX* ZZX_square(ZZX* x)
{
- struct ZZX* s = new ZZX();
+ ZZX* s = new ZZX();
sqr(*s, *x);
return s;
}
-int ZZX_is_monic(struct ZZX* x)
+int ZZX_is_monic(ZZX* x)
{
return IsOne(LeadCoeff(*x));
}
-struct ZZX* ZZX_neg(struct ZZX* x)
+ZZX* ZZX_neg(ZZX* x)
{
- struct ZZX* y = new ZZX();
+ ZZX* y = new ZZX();
*y = -*x;
return y;
}
-struct ZZX* ZZX_left_shift(struct ZZX* x, long n)
+ZZX* ZZX_left_shift(ZZX* x, long n)
{
- struct ZZX* y = new ZZX();
+ ZZX* y = new ZZX();
LeftShift(*y, *x, n);
return y;
}
-struct ZZX* ZZX_right_shift(struct ZZX* x, long n)
+ZZX* ZZX_right_shift(ZZX* x, long n)
{
- struct ZZX* y = new ZZX();
+ ZZX* y = new ZZX();
RightShift(*y, *x, n);
return y;
}
-struct ZZX* ZZX_primitive_part(struct ZZX* x)
+ZZX* ZZX_primitive_part(ZZX* x)
{
- struct ZZX* p = new ZZX();
+ ZZX* p = new ZZX();
PrimitivePart(*p, *x);
return p;
}
-void ZZX_pseudo_quo_rem(struct ZZX* x, struct ZZX* y, struct ZZX** r, struct ZZX** q)
+void ZZX_pseudo_quo_rem(ZZX* x, ZZX* y, ZZX** r, ZZX** q)
{
*r = new ZZX();
*q = new ZZX();
@@ -322,16 +322,15 @@ void ZZX_pseudo_quo_rem(struct ZZX* x, s
}
-struct ZZX* ZZX_gcd(struct ZZX* x, struct ZZX* y)
+ZZX* ZZX_gcd(ZZX* x, ZZX* y)
{
- struct ZZX* g = new ZZX();
+ ZZX* g = new ZZX();
GCD(*g, *x, *y);
return g;
}
-void ZZX_xgcd(struct ZZX* x, struct ZZX* y, struct ZZ** r, struct ZZX** s,
- struct ZZX** t, int proof)
+void ZZX_xgcd(ZZX* x, ZZX* y, ZZ** r, ZZX** s, ZZX** t, int proof)
{
*r = new ZZ();
*s = new ZZX();
@@ -340,24 +339,24 @@ void ZZX_xgcd(struct ZZX* x, struct ZZX*
}
-long ZZX_degree(struct ZZX* x)
+long ZZX_degree(ZZX* x)
{
return deg(*x);
}
-void ZZX_set_x(struct ZZX* x)
+void ZZX_set_x(ZZX* x)
{
SetX(*x);
}
-int ZZX_is_x(struct ZZX* x)
+int ZZX_is_x(ZZX* x)
{
return IsX(*x);
}
-struct ZZX* ZZX_derivative(struct ZZX* x)
+ZZX* ZZX_derivative(ZZX* x)
{
ZZX* d = new ZZX();
diff(*d, *x);
@@ -365,14 +364,14 @@ struct ZZX* ZZX_derivative(struct ZZX* x
}
-struct ZZX* ZZX_reverse(struct ZZX* x)
+ZZX* ZZX_reverse(ZZX* x)
{
ZZX* r = new ZZX();
reverse(*r, *x);
return r;
}
-struct ZZX* ZZX_reverse_hi(struct ZZX* x, int hi)
+ZZX* ZZX_reverse_hi(ZZX* x, int hi)
{
ZZX* r = new ZZX();
reverse(*r, *x, hi);
@@ -380,7 +379,7 @@ struct ZZX* ZZX_reverse_hi(struct ZZX* x
}
-struct ZZX* ZZX_truncate(struct ZZX* x, long m)
+ZZX* ZZX_truncate(ZZX* x, long m)
{
ZZX* t = new ZZX();
trunc(*t, *x, m);
@@ -388,7 +387,7 @@ struct ZZX* ZZX_truncate(struct ZZX* x,
}
-struct ZZX* ZZX_multiply_and_truncate(struct ZZX* x, struct ZZX* y, long m)
+ZZX* ZZX_multiply_and_truncate(ZZX* x, ZZX* y, long m)
{
ZZX* t = new ZZX();
MulTrunc(*t, *x, *y, m);
@@ -396,7 +395,7 @@ struct ZZX* ZZX_multiply_and_truncate(st
}
-struct ZZX* ZZX_square_and_truncate(struct ZZX* x, long m)
+ZZX* ZZX_square_and_truncate(ZZX* x, long m)
{
ZZX* t = new ZZX();
SqrTrunc(*t, *x, m);
@@ -404,7 +403,7 @@ struct ZZX* ZZX_square_and_truncate(stru
}
-struct ZZX* ZZX_invert_and_truncate(struct ZZX* x, long m)
+ZZX* ZZX_invert_and_truncate(ZZX* x, long m)
{
ZZX* t = new ZZX();
InvTrunc(*t, *x, m);
@@ -412,7 +411,7 @@ struct ZZX* ZZX_invert_and_truncate(stru
}
-struct ZZX* ZZX_multiply_mod(struct ZZX* x, struct ZZX* y, struct ZZX* modulus)
+ZZX* ZZX_multiply_mod(ZZX* x, ZZX* y, ZZX* modulus)
{
ZZX* p = new ZZX();
MulMod(*p, *x, *y, *modulus);
@@ -420,7 +419,7 @@ struct ZZX* ZZX_multiply_mod(struct ZZX*
}
-struct ZZ* ZZX_trace_mod(struct ZZX* x, struct ZZX* y)
+ZZ* ZZX_trace_mod(ZZX* x, ZZX* y)
{
ZZ* p = new ZZ();
TraceMod(*p, *x, *y);
@@ -428,7 +427,7 @@ struct ZZ* ZZX_trace_mod(struct ZZX* x,
}
-char* ZZX_trace_list(struct ZZX* x)
+char* ZZX_trace_list(ZZX* x)
{
vec_ZZ v;
TraceVec(v, *x);
@@ -441,7 +440,7 @@ char* ZZX_trace_list(struct ZZX* x)
}
-struct ZZ* ZZX_resultant(struct ZZX* x, struct ZZX* y, int proof)
+ZZ* ZZX_resultant(ZZX* x, ZZX* y, int proof)
{
ZZ* res = new ZZ();
resultant(*res, *x, *y, proof);
@@ -449,7 +448,7 @@ struct ZZ* ZZX_resultant(struct ZZX* x,
}
-struct ZZ* ZZX_norm_mod(struct ZZX* x, struct ZZX* y, int proof)
+ZZ* ZZX_norm_mod(ZZX* x, ZZX* y, int proof)
{
ZZ* res = new ZZ();
NormMod(*res, *x, *y, proof);
@@ -457,7 +456,7 @@ struct ZZ* ZZX_norm_mod(struct ZZX* x, s
}
-struct ZZ* ZZX_discriminant(struct ZZX* x, int proof)
+ZZ* ZZX_discriminant(ZZX* x, int proof)
{
ZZ* d = new ZZ();
discriminant(*d, *x, proof);
@@ -465,7 +464,7 @@ struct ZZ* ZZX_discriminant(struct ZZX*
}
-struct ZZX* ZZX_charpoly_mod(struct ZZX* x, struct ZZX* y, int proof)
+ZZX* ZZX_charpoly_mod(ZZX* x, ZZX* y, int proof)
{
ZZX* f = new ZZX();
CharPolyMod(*f, *x, *y, proof);
@@ -473,7 +472,7 @@ struct ZZX* ZZX_charpoly_mod(struct ZZX*
}
-struct ZZX* ZZX_minpoly_mod(struct ZZX* x, struct ZZX* y)
+ZZX* ZZX_minpoly_mod(ZZX* x, ZZX* y)
{
ZZX* f = new ZZX();
MinPolyMod(*f, *x, *y);
@@ -481,19 +480,19 @@ struct ZZX* ZZX_minpoly_mod(struct ZZX*
}
-void ZZX_clear(struct ZZX* x)
+void ZZX_clear(ZZX* x)
{
clear(*x);
}
-void ZZX_preallocate_space(struct ZZX* x, long n)
+void ZZX_preallocate_space(ZZX* x, long n)
{
x->SetMaxLength(n);
}
/*
-EXTERN struct ZZ* ZZX_polyeval(struct ZZX* f, struct ZZ* a)
+EXTERN ZZ* ZZX_polyeval(ZZX* f, ZZ* a)
{
ZZ* b = new ZZ();
*b = PolyEval(*f, *a);
@@ -501,7 +500,7 @@ EXTERN struct ZZ* ZZX_polyeval(struct ZZ
}
*/
-void ZZX_squarefree_decomposition(struct ZZX*** v, long** e, long* n, struct ZZX* x)
+void ZZX_squarefree_decomposition(ZZX*** v, long** e, long* n, ZZX* x)
{
vec_pair_ZZX_long factors;
SquareFreeDecomp(factors, *x);
@@ -518,7 +517,7 @@ void ZZX_squarefree_decomposition(struct
//////// ZZ_pX //////////
///////////////////////////////////////////////
-// char* ZZ_pX_repr(struct ZZ_pX* x)
+// char* ZZ_pX_repr(ZZ_pX* x)
// {
// ostringstream instore;
// instore << (*x);
@@ -528,17 +527,17 @@ void ZZX_squarefree_decomposition(struct
// return buf;
// }
-// void ZZ_pX_dealloc(struct ZZ_pX* x) {
+// void ZZ_pX_dealloc(ZZ_pX* x) {
// delete x;
// }
-// struct ZZ_pX* ZZ_pX_copy(struct ZZ_pX* x) {
+// ZZ_pX* ZZ_pX_copy(ZZ_pX* x) {
// return new ZZ_pX(*x);
// }
// /* Sets ith coefficient of x to value.
// AUTHOR: David Harvey (2008-06-08) */
-// void ZZ_pX_setitem_from_int(struct ZZ_pX* x, long i, int value)
+// void ZZ_pX_setitem_from_int(ZZ_pX* x, long i, int value)
// {
// SetCoeff(*x, i, value);
// }
@@ -546,26 +545,26 @@ void ZZX_squarefree_decomposition(struct
// /* Returns ith coefficient of x.
// Return value is only valid if the result should fit into an int.
// AUTHOR: David Harvey (2008-06-08) */
-// int ZZ_pX_getitem_as_int(struct ZZ_pX* x, long i)
+// int ZZ_pX_getitem_as_int(ZZ_pX* x, long i)
// {
// return ZZ_to_int(&rep(coeff(*x, i)));
// }
-// struct ZZ_pX* ZZ_pX_add(struct ZZ_pX* x, struct ZZ_pX* y)
+// ZZ_pX* ZZ_pX_add(ZZ_pX* x, ZZ_pX* y)
// {
// ZZ_pX *z = new ZZ_pX();
// add(*z, *x, *y);
// return z;
// }
-// struct ZZ_pX* ZZ_pX_sub(struct ZZ_pX* x, struct ZZ_pX* y)
+// ZZ_pX* ZZ_pX_sub(ZZ_pX* x, ZZ_pX* y)
// {
// ZZ_pX *z = new ZZ_pX();
// sub(*z, *x, *y);
// return z;
// }
-// struct ZZ_pX* ZZ_pX_mul(struct ZZ_pX* x, struct ZZ_pX* y)
+// ZZ_pX* ZZ_pX_mul(ZZ_pX* x, ZZ_pX* y)
// {
// ZZ_pX *z = new ZZ_pX();
// mul(*z, *x, *y);
@@ -573,24 +572,24 @@ void ZZX_squarefree_decomposition(struct
// }
-// struct ZZ_pX* ZZ_pX_div(struct ZZ_pX* x, struct ZZ_pX* y, int* divisible)
+// ZZ_pX* ZZ_pX_div(ZZ_pX* x, ZZ_pX* y, int* divisible)
// {
-// struct ZZ_pX* z = new ZZ_pX();
+// ZZ_pX* z = new ZZ_pX();
// *divisible = divide(*z, *x, *y);
// return z;
// }
-// struct ZZ_pX* ZZ_pX_mod(struct ZZ_pX* x, struct ZZ_pX* y)
+// ZZ_pX* ZZ_pX_mod(ZZ_pX* x, ZZ_pX* y)
// {
-// struct ZZ_pX* z = new ZZ_pX();
+// ZZ_pX* z = new ZZ_pX();
// rem(*z, *x, *y);
// return z;
// }
-// void ZZ_pX_quo_rem(struct ZZ_pX* x, struct ZZ_pX* y, struct ZZ_pX** r, struct ZZ_pX** q)
+// void ZZ_pX_quo_rem(ZZ_pX* x, ZZ_pX* y, ZZ_pX** r, ZZ_pX** q)
// {
// *r = new ZZ_pX();
// *q = new ZZ_pX();
@@ -598,55 +597,55 @@ void ZZX_squarefree_decomposition(struct
// }
-// struct ZZ_pX* ZZ_pX_square(struct ZZ_pX* x)
+// ZZ_pX* ZZ_pX_square(ZZ_pX* x)
// {
-// struct ZZ_pX* s = new ZZ_pX();
+// ZZ_pX* s = new ZZ_pX();
// sqr(*s, *x);
// return s;
// }
-// int ZZ_pX_is_monic(struct ZZ_pX* x)
+// int ZZ_pX_is_monic(ZZ_pX* x)
// {
// IsOne(LeadCoeff(*x));
// }
-// struct ZZ_pX* ZZ_pX_neg(struct ZZ_pX* x)
+// ZZ_pX* ZZ_pX_neg(ZZ_pX* x)
// {
-// struct ZZ_pX* y = new ZZ_pX();
+// ZZ_pX* y = new ZZ_pX();
// *y = -*x;
// return y;
// }
-// struct ZZ_pX* ZZ_pX_left_shift(struct ZZ_pX* x, long n)
+// ZZ_pX* ZZ_pX_left_shift(ZZ_pX* x, long n)
// {
-// struct ZZ_pX* y = new ZZ_pX();
+// ZZ_pX* y = new ZZ_pX();
// LeftShift(*y, *x, n);
// return y;
// }
-// struct ZZ_pX* ZZ_pX_right_shift(struct ZZ_pX* x, long n)
+// ZZ_pX* ZZ_pX_right_shift(ZZ_pX* x, long n)
// {
-// struct ZZ_pX* y = new ZZ_pX();
+// ZZ_pX* y = new ZZ_pX();
// RightShift(*y, *x, n);
// return y;
// }
-// struct ZZ_pX* ZZ_pX_gcd(struct ZZ_pX* x, struct ZZ_pX* y)
+// ZZ_pX* ZZ_pX_gcd(ZZ_pX* x, ZZ_pX* y)
// {
-// struct ZZ_pX* g = new ZZ_pX();
+// ZZ_pX* g = new ZZ_pX();
// GCD(*g, *x, *y);
// return g;
// }
-// void ZZ_pX_xgcd(struct ZZ_pX** d, struct ZZ_pX** s, struct ZZ_pX** t, struct ZZ_pX* a, struct ZZ_pX* b)
+// void ZZ_pX_xgcd(ZZ_pX** d, ZZ_pX** s, ZZ_pX** t, ZZ_pX* a, ZZ_pX* b)
// {
// *d = new ZZ_pX();
// *s = new ZZ_pX();
@@ -654,7 +653,7 @@ void ZZX_squarefree_decomposition(struct
// XGCD(**d, **s, **t, *a, *b);
// }
-// void ZZ_pX_plain_xgcd(struct ZZ_pX** d, struct ZZ_pX** s, struct ZZ_pX** t, struct ZZ_pX* a, struct ZZ_pX* b)
+// void ZZ_pX_plain_xgcd(ZZ_pX** d, ZZ_pX** s, ZZ_pX** t, ZZ_pX* a, ZZ_pX* b)
// {
// *d = new ZZ_pX();
// *s = new ZZ_pX();
@@ -662,25 +661,25 @@ void ZZX_squarefree_decomposition(struct
// PlainXGCD(**d, **s, **t, *a, *b);
// }
-// ZZ_p* ZZ_pX_leading_coefficient(struct ZZ_pX* x)
+// ZZ_p* ZZ_pX_leading_coefficient(ZZ_pX* x)
// {
// return new ZZ_p(LeadCoeff(*x));
// }
-// void ZZ_pX_set_x(struct ZZ_pX* x)
+// void ZZ_pX_set_x(ZZ_pX* x)
// {
// SetX(*x);
// }
-// int ZZ_pX_is_x(struct ZZ_pX* x)
+// int ZZ_pX_is_x(ZZ_pX* x)
// {
// return IsX(*x);
// }
-// struct ZZ_pX* ZZ_pX_derivative(struct ZZ_pX* x)
+// ZZ_pX* ZZ_pX_derivative(ZZ_pX* x)
// {
// ZZ_pX* d = new ZZ_pX();
// diff(*d, *x);
@@ -688,14 +687,14 @@ void ZZX_squarefree_decomposition(struct
// }
-// struct ZZ_pX* ZZ_pX_reverse(struct ZZ_pX* x)
+// ZZ_pX* ZZ_pX_reverse(ZZ_pX* x)
// {
// ZZ_pX* r = new ZZ_pX();
// reverse(*r, *x);
// return r;
// }
-// struct ZZ_pX* ZZ_pX_reverse_hi(struct ZZ_pX* x, int hi)
+// ZZ_pX* ZZ_pX_reverse_hi(ZZ_pX* x, int hi)
// {
// ZZ_pX* r = new ZZ_pX();
// reverse(*r, *x, hi);
@@ -703,7 +702,7 @@ void ZZX_squarefree_decomposition(struct
// }
-// struct ZZ_pX* ZZ_pX_truncate(struct ZZ_pX* x, long m)
+// ZZ_pX* ZZ_pX_truncate(ZZ_pX* x, long m)
// {
// ZZ_pX* t = new ZZ_pX();
// trunc(*t, *x, m);
@@ -711,7 +710,7 @@ void ZZX_squarefree_decomposition(struct
// }
-// struct ZZ_pX* ZZ_pX_multiply_and_truncate(struct ZZ_pX* x, struct ZZ_pX* y, long m)
+// ZZ_pX* ZZ_pX_multiply_and_truncate(ZZ_pX* x, ZZ_pX* y, long m)
// {
// ZZ_pX* t = new ZZ_pX();
// MulTrunc(*t, *x, *y, m);
@@ -719,7 +718,7 @@ void ZZX_squarefree_decomposition(struct
// }
-// struct ZZ_pX* ZZ_pX_square_and_truncate(struct ZZ_pX* x, long m)
+// ZZ_pX* ZZ_pX_square_and_truncate(ZZ_pX* x, long m)
// {
// ZZ_pX* t = new ZZ_pX();
// SqrTrunc(*t, *x, m);
@@ -727,7 +726,7 @@ void ZZX_squarefree_decomposition(struct
// }
-// struct ZZ_pX* ZZ_pX_invert_and_truncate(struct ZZ_pX* x, long m)
+// ZZ_pX* ZZ_pX_invert_and_truncate(ZZ_pX* x, long m)
// {
// ZZ_pX* t = new ZZ_pX();
// InvTrunc(*t, *x, m);
@@ -735,7 +734,7 @@ void ZZX_squarefree_decomposition(struct
// }
-// struct ZZ_pX* ZZ_pX_multiply_mod(struct ZZ_pX* x, struct ZZ_pX* y, struct ZZ_pX* modulus)
+// ZZ_pX* ZZ_pX_multiply_mod(ZZ_pX* x, ZZ_pX* y, ZZ_pX* modulus)
// {
// ZZ_pX* p = new ZZ_pX();
// MulMod(*p, *x, *y, *modulus);
@@ -743,7 +742,7 @@ void ZZX_squarefree_decomposition(struct
// }
-// struct ZZ_p* ZZ_pX_trace_mod(struct ZZ_pX* x, struct ZZ_pX* y)
+// ZZ_p* ZZ_pX_trace_mod(ZZ_pX* x, ZZ_pX* y)
// {
// ZZ_p* p = new ZZ_p();
// TraceMod(*p, *x, *y);
@@ -751,7 +750,7 @@ void ZZX_squarefree_decomposition(struct
// }
-char* ZZ_pX_trace_list(struct ZZ_pX* x)
+char* ZZ_pX_trace_list(ZZ_pX* x)
{
vec_ZZ_p v;
TraceVec(v, *x);
@@ -764,7 +763,7 @@ char* ZZ_pX_trace_list(struct ZZ_pX* x)
}
-// struct ZZ_p* ZZ_pX_resultant(struct ZZ_pX* x, struct ZZ_pX* y)
+// ZZ_p* ZZ_pX_resultant(ZZ_pX* x, ZZ_pX* y)
// {
// ZZ_p* res = new ZZ_p();
// resultant(*res, *x, *y);
@@ -772,7 +771,7 @@ char* ZZ_pX_trace_list(struct ZZ_pX* x)
// }
-// struct ZZ_p* ZZ_pX_norm_mod(struct ZZ_pX* x, struct ZZ_pX* y)
+// ZZ_p* ZZ_pX_norm_mod(ZZ_pX* x, ZZ_pX* y)
// {
// ZZ_p* res = new ZZ_p();
// NormMod(*res, *x, *y);
@@ -781,7 +780,7 @@ char* ZZ_pX_trace_list(struct ZZ_pX* x)
-// struct ZZ_pX* ZZ_pX_charpoly_mod(struct ZZ_pX* x, struct ZZ_pX* y)
+// ZZ_pX* ZZ_pX_charpoly_mod(ZZ_pX* x, ZZ_pX* y)
// {
// ZZ_pX* f = new ZZ_pX();
// CharPolyMod(*f, *x, *y);
@@ -789,7 +788,7 @@ char* ZZ_pX_trace_list(struct ZZ_pX* x)
// }
-// struct ZZ_pX* ZZ_pX_minpoly_mod(struct ZZ_pX* x, struct ZZ_pX* y)
+// ZZ_pX* ZZ_pX_minpoly_mod(ZZ_pX* x, ZZ_pX* y)
// {
// ZZ_pX* f = new ZZ_pX();
// MinPolyMod(*f, *x, *y);
@@ -797,18 +796,18 @@ char* ZZ_pX_trace_list(struct ZZ_pX* x)
// }
-// void ZZ_pX_clear(struct ZZ_pX* x)
+// void ZZ_pX_clear(ZZ_pX* x)
// {
// clear(*x);
// }
-// void ZZ_pX_preallocate_space(struct ZZ_pX* x, long n)
+// void ZZ_pX_preallocate_space(ZZ_pX* x, long n)
// {
// x->SetMaxLength(n);
// }
-void ZZ_pX_factor(struct ZZ_pX*** v, long** e, long* n, struct ZZ_pX* x, long verbose)
+void ZZ_pX_factor(ZZ_pX*** v, long** e, long* n, ZZ_pX* x, long verbose)
{
long i;
vec_pair_ZZ_pX_long factors;
@@ -822,7 +821,7 @@ void ZZ_pX_factor(struct ZZ_pX*** v, lon
}
}
-void ZZ_pX_linear_roots(struct ZZ_p*** v, long* n, struct ZZ_pX* f)
+void ZZ_pX_linear_roots(ZZ_p*** v, long* n, ZZ_pX* f)
{
long i;
vec_ZZ_p w;
@@ -836,7 +835,7 @@ void ZZ_pX_linear_roots(struct ZZ_p*** v
/////////// ZZ_pE //////////////
-struct ZZ_pX ZZ_pE_to_ZZ_pX(struct ZZ_pE x)
+ZZ_pX ZZ_pE_to_ZZ_pX(ZZ_pE x)
{
return ZZ_pX(rep(x));
}
@@ -845,67 +844,67 @@ struct ZZ_pX ZZ_pE_to_ZZ_pX(struct ZZ_pE
//////// mat_ZZ ////////// //////// mat_ZZ //////////
@ -1210,8 +461,8 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp.orig sage-5.13/sp
mZZ->SetDims(nrows, ncols); mZZ->SetDims(nrows, ncols);
} }
-struct mat_ZZ* mat_ZZ_pow(const struct mat_ZZ* x, long e) -struct mat_ZZ* mat_ZZ_pow(const struct mat_ZZ* x, long e)
+mat_ZZ* mat_ZZ_pow(const mat_ZZ* x, long e) +mat_ZZ* mat_ZZ_pow(const mat_ZZ* x, long e)
{ {
mat_ZZ *z = new mat_ZZ(); mat_ZZ *z = new mat_ZZ();
power(*z, *x, e); power(*z, *x, e);
@ -1235,7 +486,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp.orig sage-5.13/sp
+void mat_ZZ_setitem(mat_ZZ* x, int i, int j, const ZZ* z) +void mat_ZZ_setitem(mat_ZZ* x, int i, int j, const ZZ* z)
{ {
(*x)[i][j] = *z; (*x)[i][j] = *z;
} }
-struct ZZ* mat_ZZ_getitem(const struct mat_ZZ* x, int i, int j) -struct ZZ* mat_ZZ_getitem(const struct mat_ZZ* x, int i, int j)
@ -1281,7 +532,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp.orig sage-5.13/sp
{ {
ZZX* f = new ZZX(); ZZX* f = new ZZX();
CharPoly(*f, *A); CharPoly(*f, *A);
@@ -928,12 +927,12 @@ GF2EContext* GF2EContext_new(const GF2X @@ -928,12 +928,12 @@ GF2EContext* GF2EContext_new(const GF2X
} }
@ -1296,7 +547,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp.orig sage-5.13/sp
{ {
(*x)[i][j] = *z; (*x)[i][j] = *z;
} }
@@ -1022,7 +1021,7 @@ void ZZ_pEX_conv_modulus(ZZ_pEX &fout, c @@ -1022,7 +1022,7 @@ void ZZ_pEX_conv_modulus(ZZ_pEX &fout, c
fout.normalize(); fout.normalize();
} }
@ -1305,7 +556,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp.orig sage-5.13/sp
{ {
// Sets index, where the indexth coefficient of f has the minimum p-adic valuation. // Sets index, where the indexth coefficient of f has the minimum p-adic valuation.
// Sets valuation to be this valuation. // Sets valuation to be this valuation.
@@ -1067,7 +1066,7 @@ void ZZ_pX_min_val_coeff(long & valuatio @@ -1067,7 +1067,7 @@ void ZZ_pX_min_val_coeff(long & valuatio
delete u; delete u;
} }
@ -1314,7 +565,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp.orig sage-5.13/sp
{ {
// Gets the p-adic valuation of the ith coefficient of f. // Gets the p-adic valuation of the ith coefficient of f.
ZZ *u = new ZZ(); ZZ *u = new ZZ();
@@ -1076,7 +1075,7 @@ long ZZ_pX_get_val_coeff(const struct ZZ @@ -1076,7 +1076,7 @@ long ZZ_pX_get_val_coeff(const struct ZZ
return ans; return ans;
} }
@ -1323,8 +574,8 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp.orig sage-5.13/sp
{ {
// Multiplies each coefficient by pn, and sets the context of the answer to c. // Multiplies each coefficient by pn, and sets the context of the answer to c.
@@ -1102,7 +1101,7 @@ void ZZ_pX_left_pshift(struct ZZ_pX &x, @@ -1102,7 +1102,7 @@ void ZZ_pX_left_pshift(struct ZZ_pX &x,
x.normalize(); x.normalize();
} }
-void ZZ_pX_right_pshift(struct ZZ_pX &x, const struct ZZ_pX &a, const struct ZZ &pn, const struct ZZ_pContext &c) -void ZZ_pX_right_pshift(struct ZZ_pX &x, const struct ZZ_pX &a, const struct ZZ &pn, const struct ZZ_pContext &c)
@ -1332,8 +583,8 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp.orig sage-5.13/sp
{ {
// Divides each coefficient by pn, and sets the context of the answer to c. // Divides each coefficient by pn, and sets the context of the answer to c.
@@ -1128,7 +1127,7 @@ void ZZ_pX_right_pshift(struct ZZ_pX &x, @@ -1128,7 +1128,7 @@ void ZZ_pX_right_pshift(struct ZZ_pX &x,
x.normalize(); x.normalize();
} }
-void ZZ_pX_InvMod_newton_unram(struct ZZ_pX &x, const struct ZZ_pX &a, const struct ZZ_pXModulus &F, const struct ZZ_pContext &cpn, const struct ZZ_pContext &cp) -void ZZ_pX_InvMod_newton_unram(struct ZZ_pX &x, const struct ZZ_pX &a, const struct ZZ_pXModulus &F, const struct ZZ_pContext &cpn, const struct ZZ_pContext &cp)
@ -1341,7 +592,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp.orig sage-5.13/sp
{ {
//int j; //int j;
cp.restore(); cp.restore();
@@ -1163,7 +1162,7 @@ void ZZ_pX_InvMod_newton_unram(struct ZZ @@ -1163,7 +1163,7 @@ void ZZ_pX_InvMod_newton_unram(struct ZZ
delete xn; delete xn;
} }
@ -1350,9 +601,9 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/src/ntl_wrap.cpp.orig sage-5.13/sp
{ {
//int j; //int j;
cpn.restore(); cpn.restore();
diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/ntl/decl.pxi.orig sage-5.13/spkg/build/sage-5.13/sage/libs/ntl/decl.pxi diff -up src/sage/libs/ntl/decl.pxi.orig src/sage/libs/ntl/decl.pxi
--- sage-5.13/spkg/build/sage-5.13/sage/libs/ntl/decl.pxi.orig 2013-07-29 19:39:08.246018227 -0300 --- src/sage/libs/ntl/decl.pxi.orig 2014-02-07 15:20:57.090216365 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/libs/ntl/decl.pxi 2013-07-29 19:40:11.836020662 -0300 +++ src/sage/libs/ntl/decl.pxi 2014-02-07 15:21:00.833216508 -0200
@@ -22,7 +22,7 @@ from sage.libs.ntl.ntl_ZZ_pEX_decl cimpo @@ -22,7 +22,7 @@ from sage.libs.ntl.ntl_ZZ_pEX_decl cimpo
cdef extern from "ntl_wrap.h": cdef extern from "ntl_wrap.h":

View file

@ -1,36 +1,21 @@
diff -up sage-5.13/spkg/build/sage-5.13/sage/interfaces/gp.py.orig sage-5.13/spkg/build/sage-5.13/sage/interfaces/gp.py diff -up src/sage/libs/pari/pari_instance.pxd.orig src/sage/libs/pari/pari_instance.pxd
--- sage-5.13/spkg/build/sage-5.13/sage/interfaces/gp.py.orig 2014-01-28 16:06:59.279200475 -0200 --- src/sage/libs/pari/pari_instance.pxd.orig 2014-02-07 11:58:23.031750944 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/interfaces/gp.py 2014-01-28 16:07:36.218201890 -0200 +++ src/sage/libs/pari/pari_instance.pxd 2014-02-07 11:58:44.805751778 -0200
@@ -977,11 +977,11 @@ def is_GpElement(x): @@ -5,6 +5,10 @@ cimport cython
"""
return isinstance(x, GpElement)
-from sage.env import DOT_SAGE, SAGE_LOCAL from sage.libs.pari.gen cimport gen
+from sage.env import DOT_SAGE, SAGE_EXTCODE
import os
-# Set GPRC environment variable to $SAGE_LOCAL/etc/gprc.expect
-os.environ["GPRC"] = os.path.join(SAGE_LOCAL, 'etc', 'gprc.expect')
+# Set GPRC environment variable to $SAGE_EXTCODE/pari/gprc.expect
+os.environ["GPRC"] = '%s/pari/gprc.expect'%SAGE_EXTCODE
# An instance
gp = Gp(logfile=os.path.join(DOT_SAGE,'gp-expect.log')) # useful for debugging!
diff -up sage-5.13/spkg/build/sage-5.13/sage/libs/pari/gen.pyx.orig sage-5.13/spkg/build/sage-5.13/sage/libs/pari/gen.pyx
--- sage-5.13/spkg/build/sage-5.13/sage/libs/pari/gen.pyx.orig 2014-01-28 16:07:00.806200534 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/libs/pari/gen.pyx 2014-01-28 16:08:42.169204415 -0200
@@ -194,6 +194,10 @@ cdef extern from "misc.h":
cdef extern from "mpz_pylong.h":
cdef int mpz_set_pylong(mpz_t dst, src) except -1
+cdef extern from "gmp.h": +cdef extern from "gmp.h":
+ cdef void mp_get_memory_functions(void**, void**, void**) + cdef void mp_get_memory_functions(void**, void**, void**)
+ cdef void mp_set_memory_functions(void*, void*, void*) + cdef void mp_set_memory_functions(void*, void*, void*)
+ +
# Will be imported as needed cpdef long prec_bits_to_words(unsigned long prec_in_bits)
Integer = None
@@ -9319,7 +9323,12 @@ cdef class PariInstance(sage.structure.p @cython.final
diff -up src/sage/libs/pari/pari_instance.pyx.orig src/sage/libs/pari/pari_instance.pyx
--- src/sage/libs/pari/pari_instance.pyx.orig 2014-02-07 11:57:54.455749850 -0200
+++ src/sage/libs/pari/pari_instance.pyx 2014-02-07 11:59:13.119752862 -0200
@@ -434,7 +434,12 @@ cdef class PariInstance(sage.structure.p
# The size here doesn't really matter, because we will allocate # The size here doesn't really matter, because we will allocate
# our own stack anyway. We ask PARI not to set up signal and # our own stack anyway. We ask PARI not to set up signal and
# error handlers. # error handlers.

View file

@ -1,7 +1,7 @@
diff -up sage-5.13/spkg/build/sage-5.13/module_list.py.orig sage-5.13/spkg/build/sage-5.13/module_list.py diff -up src/module_list.py.orig src/module_list.py
--- sage-5.13/spkg/build/sage-5.13/module_list.py.orig 2014-01-28 16:00:48.914186293 -0200 --- src/module_list.py.orig 2014-02-07 11:50:03.665731821 -0200
+++ sage-5.13/spkg/build/sage-5.13/module_list.py 2014-01-28 16:00:58.259186651 -0200 +++ src/module_list.py 2014-02-07 11:50:13.454732196 -0200
@@ -1035,7 +1035,7 @@ ext_modules = [ @@ -1066,7 +1066,7 @@ ext_modules = [
Extension('sage.matrix.matrix_mod2_dense', Extension('sage.matrix.matrix_mod2_dense',
sources = ['sage/matrix/matrix_mod2_dense.pyx'], sources = ['sage/matrix/matrix_mod2_dense.pyx'],
@ -10,7 +10,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/module_list.py.orig sage-5.13/spkg/build
extra_compile_args = m4ri_extra_compile_args, extra_compile_args = m4ri_extra_compile_args,
depends = [SAGE_INC + "/png.h", SAGE_INC + "/m4ri/m4ri.h"]), depends = [SAGE_INC + "/png.h", SAGE_INC + "/m4ri/m4ri.h"]),
@@ -1333,7 +1333,7 @@ ext_modules = [ @@ -1369,7 +1369,7 @@ ext_modules = [
Extension('sage.modules.vector_mod2_dense', Extension('sage.modules.vector_mod2_dense',
sources = ['sage/modules/vector_mod2_dense.pyx'], sources = ['sage/modules/vector_mod2_dense.pyx'],
@ -18,8 +18,8 @@ diff -up sage-5.13/spkg/build/sage-5.13/module_list.py.orig sage-5.13/spkg/build
+ libraries = ['gmp','m4ri', 'png', 'gd'], + libraries = ['gmp','m4ri', 'png', 'gd'],
extra_compile_args = m4ri_extra_compile_args, extra_compile_args = m4ri_extra_compile_args,
depends = [SAGE_INC + "/png.h", SAGE_INC + "/m4ri/m4ri.h"]), depends = [SAGE_INC + "/png.h", SAGE_INC + "/m4ri/m4ri.h"]),
@@ -1824,7 +1824,7 @@ ext_modules = [ @@ -1859,7 +1859,7 @@ ext_modules = [
Extension('sage.rings.polynomial.pbori', Extension('sage.rings.polynomial.pbori',
sources = ['sage/rings/polynomial/pbori.pyx'], sources = ['sage/rings/polynomial/pbori.pyx'],
libraries=['polybori-' + polybori_major_version, libraries=['polybori-' + polybori_major_version,

View file

@ -1,7 +1,7 @@
diff -up sage-5.13/spkg/build/sage-5.13/sage/all.py.orig sage-5.13/spkg/build/sage-5.13/sage/all.py diff -up src/sage/all.py.orig src/sage/all.py
--- sage-5.13/spkg/build/sage-5.13/sage/all.py.orig 2014-01-28 15:59:04.029182276 -0200 --- src/sage/all.py.orig 2014-02-07 12:43:35.244854804 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/all.py 2014-01-28 15:59:15.560182718 -0200 +++ src/sage/all.py 2014-02-07 12:44:11.798856204 -0200
@@ -304,11 +304,11 @@ def _write_started_file(): @@ -325,11 +325,11 @@ def _write_started_file():
Check that the file exists when Sage is running:: Check that the file exists when Sage is running::

View file

@ -1,22 +1,6 @@
diff -up sage-5.13/spkg/build/conway_polynomials-0.4.p0/spkg-install.orig sage-5.13/spkg/build/conway_polynomials-0.4.p0/spkg-install diff -up src/module_list.py.orig src/module_list.py
--- sage-5.13/spkg/build/conway_polynomials-0.4.p0/spkg-install.orig 2014-01-28 15:57:09.773177901 -0200 --- src/module_list.py.orig 2014-02-07 11:31:05.355688232 -0200
+++ sage-5.13/spkg/build/conway_polynomials-0.4.p0/spkg-install 2014-01-28 15:57:15.720178129 -0200 +++ src/module_list.py 2014-02-07 11:32:21.239691137 -0200
@@ -2,9 +2,10 @@
import os
from sage.all import save
-from sage.misc.misc import SAGE_SHARE
+if 'SAGE_SHARE' not in os.environ:
+ raise RuntimeError("SAGE_SHARE undefined, maybe run `sage -sh`?")
-install_root = os.path.join(SAGE_SHARE, 'conway_polynomials')
+install_root = os.path.join(os.environ['SAGE_SHARE'], 'conway_polynomials')
def create_db():
db = {}
diff -up sage-5.13/spkg/build/sage-5.13/module_list.py.orig sage-5.13/spkg/build/sage-5.13/module_list.py
--- sage-5.13/spkg/build/sage-5.13/module_list.py.orig 2014-01-28 15:56:51.221177191 -0200
+++ sage-5.13/spkg/build/sage-5.13/module_list.py 2014-01-28 15:57:15.722178129 -0200
@@ -5,7 +5,7 @@ from distutils.core import setup @@ -5,7 +5,7 @@ from distutils.core import setup
from distutils.extension import Extension from distutils.extension import Extension
from sage.env import * from sage.env import *
@ -40,7 +24,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/module_list.py.orig sage-5.13/spkg/build
flint_depends = [SAGE_INC + '/flint/flint.h'] flint_depends = [SAGE_INC + '/flint/flint.h']
singular_depends = [SAGE_INC + '/libsingular.h', SAGE_INC + '/givaro/givconfig.h'] singular_depends = [SAGE_INC + '/libsingular.h', SAGE_INC + '/givaro/givconfig.h']
@@ -71,7 +72,7 @@ givaro_extra_compile_args =['-D__STDC_LI @@ -70,7 +71,7 @@ givaro_extra_compile_args =['-D__STDC_LI
### PolyBoRi settings ### PolyBoRi settings
######################################################### #########################################################
@ -49,7 +33,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/module_list.py.orig sage-5.13/spkg/build
polybori_major_version = '0.8' polybori_major_version = '0.8'
@@ -675,7 +676,7 @@ ext_modules = [ @@ -702,7 +703,7 @@ ext_modules = [
sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'], sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'],
libraries = ['m', 'ntl', 'mpfr', 'gmp', 'gmpxx', libraries = ['m', 'ntl', 'mpfr', 'gmp', 'gmpxx',
'Lfunction', 'stdc++'], 'Lfunction', 'stdc++'],
@ -57,30 +41,17 @@ diff -up sage-5.13/spkg/build/sage-5.13/module_list.py.orig sage-5.13/spkg/build
+ include_dirs = [SAGE_INC + "/Lfunction"], + include_dirs = [SAGE_INC + "/Lfunction"],
extra_compile_args=["-O3", "-ffast-math"], extra_compile_args=["-O3", "-ffast-math"],
language = 'c++'), language = 'c++'),
diff -up sage-5.13/spkg/build/sage-5.13/setup.py.orig sage-5.13/spkg/build/sage-5.13/setup.py diff -up src/setup.py.orig src/setup.py
--- sage-5.13/spkg/build/sage-5.13/setup.py.orig 2014-01-28 15:57:09.788177902 -0200 --- src/setup.py.orig 2014-02-07 11:32:35.278691675 -0200
+++ sage-5.13/spkg/build/sage-5.13/setup.py 2014-01-28 15:57:15.723178129 -0200 +++ src/setup.py 2014-02-07 11:34:40.589696474 -0200
@@ -36,23 +36,13 @@ except KeyError: @@ -36,11 +36,11 @@ except KeyError:
compile_result_dir = None compile_result_dir = None
keep_going = False keep_going = False
-SAGE_INC = os.path.join(SAGE_LOCAL,'include') -SAGE_INC = os.path.join(SAGE_LOCAL,'include')
+SAGE_INC = '/usr/include' +SAGE_INC = '/usr/include'
-SITE_PACKAGES = '%s/lib/python%s/site-packages/'%(SAGE_LOCAL,platform.python_version().rsplit('.', 1)[0])
-if not os.path.exists(SITE_PACKAGES):
- raise RuntimeError, "Unable to find site-packages directory (see setup.py file in sage python code)."
-
-if not os.path.exists('build/sage'):
- os.makedirs('build/sage')
-
-sage_link = SITE_PACKAGES + '/sage'
-if not os.path.islink(sage_link) or not os.path.exists(sage_link):
- os.system('rm -rf "%s"'%sage_link)
- os.system('cd %s; ln -sf ../../../../devel/sage/build/sage .'%SITE_PACKAGES)
+SITE_PACKAGES = '%s/lib/python%s/site-packages'%(SAGE_LOCAL,platform.python_version().rsplit('.', 1)[0])
# search for dependencies and add to gcc -I<path> # search for dependencies and add to gcc -I<path>
include_dirs = [SAGE_INC, include_dirs = [SAGE_INC,
- os.path.join(SAGE_INC, 'csage'), - os.path.join(SAGE_INC, 'csage'),
@ -88,16 +59,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/setup.py.orig sage-5.13/spkg/build/sage-
SAGE_SRC, SAGE_SRC,
os.path.join(SAGE_SRC, 'sage', 'ext')] os.path.join(SAGE_SRC, 'sage', 'ext')]
@@ -77,7 +67,7 @@ if DEVEL: @@ -161,11 +161,11 @@ for m in ext_modules:
# compiler flag -Og is used. See also
# * http://trac.sagemath.org/sage_trac/ticket/14460
# * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982
-if subprocess.call("""$CC --version | grep -i 'gcc.* 4[.][89]' >/dev/null """, shell=True) == 0:
+if subprocess.call("""gcc --version | grep -i 'gcc.* 4[.][89]' >/dev/null """, shell=True) == 0:
extra_compile_args.append('-fno-tree-dominator-opts')
# Generate interpreters
@@ -171,11 +161,11 @@ for m in ext_modules:
# FIMXE: Do NOT link the following libraries to each and # FIMXE: Do NOT link the following libraries to each and
# every module (regardless of the language btw.): # every module (regardless of the language btw.):

View file

@ -1,6 +1,6 @@
diff -up sage-5.13/spkg/build/sage-5.13/doc/common/builder.py.orig sage-5.13/spkg/build/sage-5.13/doc/common/builder.py diff -up src/doc/common/builder.py.orig src/doc/common/builder.py
--- sage-5.13/spkg/build/sage-5.13/doc/common/builder.py.orig 2014-01-28 15:58:17.552180497 -0200 --- src/doc/common/builder.py.orig 2014-02-07 11:35:55.574699345 -0200
+++ sage-5.13/spkg/build/sage-5.13/doc/common/builder.py 2014-01-28 15:58:19.905180587 -0200 +++ src/doc/common/builder.py 2014-02-07 11:35:58.192699445 -0200
@@ -32,7 +32,7 @@ from sage.env import SAGE_DOC, SAGE_SRC @@ -32,7 +32,7 @@ from sage.env import SAGE_DOC, SAGE_SRC
# SAGE_DOC, LANGUAGES, SPHINXOPTS, PAPER, OMIT, # SAGE_DOC, LANGUAGES, SPHINXOPTS, PAPER, OMIT,
# PAPEROPTS, ALLSPHINXOPTS, NUM_THREADS, WEBSITESPHINXOPTS # PAPEROPTS, ALLSPHINXOPTS, NUM_THREADS, WEBSITESPHINXOPTS
@ -10,9 +10,9 @@ diff -up sage-5.13/spkg/build/sage-5.13/doc/common/builder.py.orig sage-5.13/spk
########################################## ##########################################
diff -up sage-5.13/spkg/build/sage-5.13/doc/common/conf.py.orig sage-5.13/spkg/build/sage-5.13/doc/common/conf.py diff -up src/doc/common/conf.py.orig src/doc/common/conf.py
--- sage-5.13/spkg/build/sage-5.13/doc/common/conf.py.orig 2014-01-28 15:58:17.562180497 -0200 --- src/doc/common/conf.py.orig 2014-02-07 11:35:55.584699345 -0200
+++ sage-5.13/spkg/build/sage-5.13/doc/common/conf.py 2014-01-28 15:58:19.908180587 -0200 +++ src/doc/common/conf.py 2014-02-07 11:35:58.194699445 -0200
@@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
import sys, os, sphinx import sys, os, sphinx
-from sage.env import SAGE_DOC -from sage.env import SAGE_DOC
@ -30,9 +30,9 @@ diff -up sage-5.13/spkg/build/sage-5.13/doc/common/conf.py.orig sage-5.13/spkg/b
mathjax_relative = os.path.join('sagenb','data','mathjax') mathjax_relative = os.path.join('sagenb','data','mathjax')
# It would be really nice if sphinx would copy the entire mathjax directory, # It would be really nice if sphinx would copy the entire mathjax directory,
diff -up sage-5.13/spkg/build/sage-5.13/sage/doctest/control.py.orig sage-5.13/spkg/build/sage-5.13/sage/doctest/control.py diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py
--- sage-5.13/spkg/build/sage-5.13/sage/doctest/control.py.orig 2014-01-28 15:57:50.711179469 -0200 --- src/sage/doctest/control.py.orig 2014-02-07 11:35:29.138698333 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/doctest/control.py 2014-01-28 15:58:19.909180587 -0200 +++ src/sage/doctest/control.py 2014-02-07 11:35:58.196699445 -0200
@@ -89,7 +89,6 @@ class DocTestDefaults(SageObject): @@ -89,7 +89,6 @@ class DocTestDefaults(SageObject):
self.valgrind = False self.valgrind = False
self.massif = False self.massif = False
@ -50,7 +50,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/doctest/control.py.orig sage-5.13/s
# Non-interactive debuggers: 48 hours # Non-interactive debuggers: 48 hours
options.timeout = int(os.getenv('SAGE_TIMEOUT_VALGRIND', 48 * 60 * 60)) options.timeout = int(os.getenv('SAGE_TIMEOUT_VALGRIND', 48 * 60 * 60))
elif options.long: elif options.long:
@@ -822,13 +821,8 @@ class DocTestController(SageObject): @@ -821,13 +820,8 @@ class DocTestController(SageObject):
elif opt.cachegrind: elif opt.cachegrind:
toolname = "cachegrind" toolname = "cachegrind"
flags = os.getenv("SAGE_CACHEGRIND_FLAGS", "") flags = os.getenv("SAGE_CACHEGRIND_FLAGS", "")
@ -64,7 +64,7 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/doctest/control.py.orig sage-5.13/s
if "%s" in flags: if "%s" in flags:
flags %= toolname + ".%p" # replace %s with toolname flags %= toolname + ".%p" # replace %s with toolname
cmd += flags + sage_cmd cmd += flags + sage_cmd
@@ -888,10 +882,10 @@ class DocTestController(SageObject): @@ -887,10 +881,10 @@ class DocTestController(SageObject):
0 0
""" """
opt = self.options opt = self.options
@ -77,9 +77,9 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/doctest/control.py.orig sage-5.13/s
return 2 return 2
return self.run_val_gdb() return self.run_val_gdb()
else: else:
diff -up sage-5.13/spkg/build/sage-5.13/sage/interfaces/singular.py.orig sage-5.13/spkg/build/sage-5.13/sage/interfaces/singular.py diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py
--- sage-5.13/spkg/build/sage-5.13/sage/interfaces/singular.py.orig 2014-01-28 15:58:17.580180498 -0200 --- src/sage/interfaces/singular.py.orig 2014-02-07 11:35:55.605699346 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/interfaces/singular.py 2014-01-28 15:58:19.911180587 -0200 +++ src/sage/interfaces/singular.py 2014-02-07 11:35:58.198699446 -0200
@@ -2149,7 +2149,7 @@ def generate_docstring_dictionary(): @@ -2149,7 +2149,7 @@ def generate_docstring_dictionary():
nodes.clear() nodes.clear()
node_names.clear() node_names.clear()
@ -89,9 +89,9 @@ diff -up sage-5.13/spkg/build/sage-5.13/sage/interfaces/singular.py.orig sage-5.
new_node = re.compile("File: singular\.hlp, Node: ([^,]*),.*") new_node = re.compile("File: singular\.hlp, Node: ([^,]*),.*")
new_lookup = re.compile("\* ([^:]*):*([^.]*)\..*") new_lookup = re.compile("\* ([^:]*):*([^.]*)\..*")
diff -up sage-5.13/spkg/build/sage-5.13/sage/misc/latex_macros.py.orig sage-5.13/spkg/build/sage-5.13/sage/misc/latex_macros.py diff -up src/sage/misc/latex_macros.py.orig src/sage/misc/latex_macros.py
--- sage-5.13/spkg/build/sage-5.13/sage/misc/latex_macros.py.orig 2014-01-28 15:58:17.585180498 -0200 --- src/sage/misc/latex_macros.py.orig 2014-02-07 11:35:55.614699347 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/misc/latex_macros.py 2014-01-28 15:58:19.912180587 -0200 +++ src/sage/misc/latex_macros.py 2014-02-07 11:35:58.199699446 -0200
@@ -142,7 +142,7 @@ def convert_latex_macro_to_mathjax(macro @@ -142,7 +142,7 @@ def convert_latex_macro_to_mathjax(macro
return name + ': ["' + defn + '",' + str(num_args) + ']' return name + ': ["' + defn + '",' + str(num_args) + ']'

View file

@ -1,30 +1,6 @@
diff -up sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/flask_version/base.py.orig sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/flask_version/base.py diff -up build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/data/sage/js/jmol_lib.js.orig build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/data/sage/js/jmol_lib.js
--- sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/flask_version/base.py.orig 2013-10-16 11:57:47.963170699 -0300 --- build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/data/sage/js/jmol_lib.js.orig 2014-02-07 11:38:58.311706343 -0200
+++ sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/flask_version/base.py 2013-10-16 11:58:10.515171562 -0300 +++ build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/data/sage/js/jmol_lib.js 2014-02-07 11:39:29.199707525 -0200
@@ -33,7 +33,7 @@ class SageNBFlask(Flask):
self.add_static_path('/javascript', DATA)
self.add_static_path('/static', DATA)
self.add_static_path('/java', DATA)
- self.add_static_path('/java/jmol', os.path.join(os.environ["SAGE_ROOT"],"local","share","jmol"))
+ self.add_static_path('/java/jmol', os.path.join(DATA, "jmol"))
import mimetypes
mimetypes.add_type('text/plain','.jmol')
diff -up sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/data/sage/html/notebook/base.html.orig sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/data/sage/html/notebook/base.html
--- sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/data/sage/html/notebook/base.html.orig 2013-10-16 11:58:21.871171997 -0300
+++ sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/data/sage/html/notebook/base.html 2013-10-16 11:59:05.075173651 -0300
@@ -46,7 +46,7 @@ INPUT:
<!-- Jmol - embedded 3D graphics -->
<script type="text/javascript" src="/java/jmol/appletweb/Jmol.js"></script>
<!-- This must stay in head -->
-<script>jmolInitialize("/java/jmol");jmolSetCallback("menuFile","/java/jmol/appletweb/SageMenu.mnu");</script>
+<script>jmolInitialize("/java/jmol", "JmolApplet.jar,vecmath.jar");</script>
{% if JEDITABLE_TINYMCE and not worksheet.docbrowser() and not worksheet.is_published() %}
<!-- TinyMCE and jEditable - in-place editing of text cells -->
diff -up sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/data/sage/js/jmol_lib.js.orig sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/data/sage/js/jmol_lib.js
--- sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/data/sage/js/jmol_lib.js.orig 2013-10-16 12:02:59.809182640 -0300
+++ sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/data/sage/js/jmol_lib.js 2013-10-16 12:03:26.748183672 -0300
@@ -256,9 +256,6 @@ function makeCntrlPanels(url, n, functio @@ -256,9 +256,6 @@ function makeCntrlPanels(url, n, functio
panelHTML +='<button title="Move to own window" onClick="javascript:void(jmol_popup(\''+n+'\'))">Move to own window</button> arbitrarily resizable.<hr/>'; panelHTML +='<button title="Move to own window" onClick="javascript:void(jmol_popup(\''+n+'\'))">Move to own window</button> arbitrarily resizable.<hr/>';
//static image to save //static image to save
@ -35,9 +11,21 @@ diff -up sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/data/sage/js/jmo
//spin on //spin on
panelHTML +='<input class="worksheet" type="checkbox" value="spin on" onchange="jmol_spin(this.checked,'+n+');" title="Enable/disable spin"/>Spin on'; panelHTML +='<input class="worksheet" type="checkbox" value="spin on" onchange="jmol_spin(this.checked,'+n+');" title="Enable/disable spin"/>Spin on';
//antialaisdisplay (smoothing of objects) //antialaisdisplay (smoothing of objects)
diff -up sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/notebook/cell.py.orig sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/notebook/cell.py diff -up build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/flask_version/base.py.orig build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/flask_version/base.py
--- sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/notebook/cell.py.orig 2013-10-16 11:59:18.079174149 -0300 --- build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/flask_version/base.py.orig 2014-02-07 11:36:58.944701772 -0200
+++ sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/notebook/cell.py 2013-10-16 11:59:41.357175041 -0300 +++ build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/flask_version/base.py 2014-02-07 11:37:17.228702472 -0200
@@ -36,7 +36,7 @@ class SageNBFlask(Flask):
self.add_static_path('/javascript', DATA)
self.add_static_path('/static', DATA)
self.add_static_path('/java', DATA)
- self.add_static_path('/java/jmol', os.path.join(os.environ["SAGE_ROOT"],"local","share","jmol"))
+ self.add_static_path('/java/jmol', os.path.join(DATA, "jmol"))
import mimetypes
mimetypes.add_type('text/plain','.jmol')
diff -up build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/notebook/cell.py.orig build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/notebook/cell.py
--- build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/notebook/cell.py.orig 2014-02-07 11:39:52.674708424 -0200
+++ build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/notebook/cell.py 2014-02-07 11:40:46.407710482 -0200
@@ -2369,7 +2369,7 @@ class Cell(Cell_generic): @@ -2369,7 +2369,7 @@ class Cell(Cell_generic):
jmol_script = jmol_file.read() jmol_script = jmol_file.read()
jmol_file.close() jmol_file.close()
@ -47,9 +35,9 @@ diff -up sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/notebook/cell.py
jmol_file = open(jmol_name, 'w') jmol_file = open(jmol_name, 'w')
jmol_file.write(jmol_script) jmol_file.write(jmol_script)
diff -up sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/notebook/run_notebook.py.orig sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/notebook/run_notebook.py diff -up build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/notebook/run_notebook.py.orig build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/notebook/run_notebook.py
--- sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/notebook/run_notebook.py.orig 2013-10-16 11:59:58.863175711 -0300 --- build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/notebook/run_notebook.py.orig 2014-02-07 11:41:06.343711245 -0200
+++ sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/notebook/run_notebook.py 2013-10-16 12:02:45.172182080 -0300 +++ build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/notebook/run_notebook.py 2014-02-07 11:41:54.694713097 -0200
@@ -46,12 +46,14 @@ sagenb.notebook.misc.DIR = %(cwd)r #We s @@ -46,12 +46,14 @@ sagenb.notebook.misc.DIR = %(cwd)r #We s
# Flask # # Flask #
######### #########
@ -67,3 +55,55 @@ diff -up sage-5.13/spkg/build/sagenb-0.10.7.2/src/sagenb/sagenb/notebook/run_not
def save_notebook(notebook): def save_notebook(notebook):
print "Quitting all running worksheets..." print "Quitting all running worksheets..."
diff -up build/pkgs/sagenb/src/sagenb-0.10.8.2/flask_version/base.py.orig build/pkgs/sagenb/src/sagenb-0.10.8.2/flask_version/base.py
--- build/pkgs/sagenb/src/sagenb-0.10.8.2/flask_version/base.py.orig 2014-02-08 12:08:41.638029141 -0200
+++ build/pkgs/sagenb/src/sagenb-0.10.8.2/flask_version/base.py 2014-02-08 12:09:17.574030517 -0200
@@ -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 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:
@@ -25,7 +23,6 @@ class SageNBFlask(Flask):
def __init__(self, *args, **kwds):
self.startup_token = kwds.pop('startup_token', None)
Flask.__init__(self, *args, **kwds)
- self.session_interface = OldSecureCookieSessionInterface()
self.config['SESSION_COOKIE_HTTPONLY'] = False
diff -up build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/flask_version/base.py.orig build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/flask_version/base.py
--- build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/flask_version/base.py.orig 2014-02-08 12:08:50.364029475 -0200
+++ build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/flask_version/base.py 2014-02-08 12:09:10.271030238 -0200
@@ -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 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:
@@ -25,7 +23,6 @@ class SageNBFlask(Flask):
def __init__(self, *args, **kwds):
self.startup_token = kwds.pop('startup_token', None)
Flask.__init__(self, *args, **kwds)
- self.session_interface = OldSecureCookieSessionInterface()
self.config['SESSION_COOKIE_HTTPONLY'] = False
diff -up build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/data/sage/html/notebook/base.html.orig build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/data/sage/html/notebook/base.html
--- build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/data/sage/html/notebook/base.html.orig 2013-12-25 11:38:29.000000000 -0200
+++ build/pkgs/sagenb/src/sagenb-0.10.8.2/sagenb/data/sage/html/notebook/base.html 2014-02-08 15:22:29.290474404 -0200
@@ -46,7 +46,7 @@ INPUT:
<!-- Jmol - embedded 3D graphics -->
<script type="text/javascript" src="/java/jmol/appletweb/Jmol.js"></script>
<!-- This must stay in head -->
-<script>jmolInitialize("/java/jmol");jmolSetCallback("menuFile","/java/jmol/appletweb/SageMenu.mnu");</script>
+<script>jmolInitialize("/java/jmol", "JmolApplet.jar,vecmath.jar");</script>
{% if JEDITABLE_TINYMCE and not worksheet.docbrowser() and not worksheet.is_published() %}
<!-- TinyMCE and jEditable - in-place editing of text cells -->

View file

@ -1,9 +1,9 @@
diff -up sage-5.13/spkg/build/sage-5.13/c_lib/SConstruct.orig sage-5.13/spkg/build/sage-5.13/c_lib/SConstruct diff -up src/c_lib/SConstruct.orig src/c_lib/SConstruct
--- sage-5.13/spkg/build/sage-5.13/c_lib/SConstruct.orig 2013-02-23 12:55:48.382841120 -0300 --- src/c_lib/SConstruct.orig 2014-02-07 10:59:45.462616244 -0200
+++ sage-5.13/spkg/build/sage-5.13/c_lib/SConstruct 2013-02-23 12:56:25.037842523 -0300 +++ src/c_lib/SConstruct 2014-02-07 11:00:41.900618405 -0200
@@ -126,18 +126,31 @@ env['PYV']=platform.python_version().rsp @@ -126,8 +126,8 @@ env['PYV']=platform.python_version().rsp
# The SCons convenience function Split is the only strange thing # The SCons convenience function Split is the only strange thing
# to python programmers. It just makes a list by splitting on # to python programmers. It just makes a list by splitting on
# whitespace without the syntax clutter of lists of strings. # whitespace without the syntax clutter of lists of strings.
-includes = ['$SAGE_LOCAL/include/', '$SAGE_LOCAL/include/python$PYV/', -includes = ['$SAGE_LOCAL/include/', '$SAGE_LOCAL/include/python$PYV/',
- '$SAGE_LOCAL/include/NTL/', 'include'] - '$SAGE_LOCAL/include/NTL/', 'include']
@ -12,7 +12,9 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/SConstruct.orig sage-5.13/spkg/bui
cFiles = Split( "convert.c interrupt.c memory.c mpn_pylong.c mpz_pylong.c") + \ cFiles = Split( "convert.c interrupt.c memory.c mpn_pylong.c mpz_pylong.c") + \
Split( "mpz_longlong.c stdsage.c gmp_globals.c" ) Split( "mpz_longlong.c stdsage.c gmp_globals.c" )
cppFiles = Split( "ZZ_pylong.cpp ntl_wrap.cpp" ) cppFiles = Split( "ZZ_pylong.cpp ntl_wrap.cpp" )
srcFiles = cFiles + cppFiles @@ -136,9 +136,22 @@ incFiles = Split( "ccobject.h convert.h
Split( "interrupt.h memory.h mpn_pylong.h mpz_longlong.h" ) + \
Split( "mpz_pylong.h ntl_wrap.h pb_wrap.h stdsage.h ZZ_pylong.h" )
+env.Append(CFLAGS='@@optflags@@') +env.Append(CFLAGS='@@optflags@@')
+env.Append(CXXFLAGS='@@optflags@@') +env.Append(CXXFLAGS='@@optflags@@')
@ -26,14 +28,11 @@ diff -up sage-5.13/spkg/build/sage-5.13/c_lib/SConstruct.orig sage-5.13/spkg/bui
+shlink_flags += [ '-Wl,-Bsymbolic', '-Wl,-soname=%s' % soname ] +shlink_flags += [ '-Wl,-Bsymbolic', '-Wl,-soname=%s' % soname ]
+ +
lib = env.SharedLibrary( "csage", [ "src/" + x for x in srcFiles ], lib = env.SharedLibrary( "csage", [ "src/" + x for x in srcFiles ],
LIBS=['ntl', 'pari', 'gmp', 'python$PYV'], LIBS=['ntl', 'pari', 'gmp', 'python$PYV'],
- LIBPATH=['$SAGE_LOCAL/lib','$SAGE_LOCAL/lib/python$PYV/config/'], - LIBPATH=['$SAGE_LOCAL/lib','$SAGE_LOCAL/lib/python$PYV/config/'],
+ LIBPATH=['@@libdir@@','@@libdir@@/python$PYV/config/'], + LIBPATH=['@@libdir@@','@@libdir@@/python$PYV/config/'],
+ SHLIBSUFFIX=shlib_suffix, + SHLIBSUFFIX=shlib_suffix,
+ SHLINKFLAGS=shlink_flags, + SHLINKFLAGS=shlink_flags,
CPPPATH=includes ) CPPPATH=includes )
-env.Install("$SAGE_LOCAL/lib", lib) env.Install("$SAGE_LOCAL/lib", lib)
+env.Install("@@libdir@@", lib) env.Install("$SAGE_LOCAL/include/csage", [ os.path.join('include',x) for x in incFiles ])
#Here we only copy the files over if we are on Cygwin. Otherwise, the
#library will be handled by the symlinks created in

View file

@ -1,6 +1,6 @@
diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage diff -up src/bin/sage.orig src/bin/sage
--- sage-5.13/spkg/bin/sage.orig 2014-01-28 15:47:54.216156627 -0200 --- src/bin/sage.orig 2014-02-07 11:02:57.653623604 -0200
+++ sage-5.13/spkg/bin/sage 2014-01-28 15:55:18.058173623 -0200 +++ src/bin/sage 2014-02-07 11:08:54.765637279 -0200
@@ -11,17 +11,14 @@ usage() { @@ -11,17 +11,14 @@ usage() {
echo " file.<sage|py|spyx> -- run given .sage, .py or .spyx files" echo " file.<sage|py|spyx> -- run given .sage, .py or .spyx files"
echo " -advanced -- list all command line options" echo " -advanced -- list all command line options"
@ -23,10 +23,10 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
echo " --optional - controls which optional tests are run" echo " --optional - controls which optional tests are run"
echo " --sagenb - test all sagenb files" echo " --sagenb - test all sagenb files"
echo " --help - show all testing options" echo " --help - show all testing options"
- echo " -upgrade [url] -- download, build and install standard packages from" - echo " -upgrade [version] -- download, build and install the given version. Here,"
- echo " given url. If url not given, automatically selects a" - echo " 'version' is a git branch or tag name. Useful values"
- echo " suitable mirror. If url='ask', it lets you select" - echo " are 'master' (the currend development version, this"
- echo " the mirror (uses SAGE_SERVER as default)." - echo " is the default) or a version number like '5.13'."
echo " -v, -version -- print the Sage version" echo " -v, -version -- print the Sage version"
exit 0 exit 0
} }
@ -47,24 +47,21 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
echo " -inotebook [...] -- start the *insecure* Sage notebook" echo " -inotebook [...] -- start the *insecure* Sage notebook"
echo " -n, -notebook [...] -- start the Sage notebook (options are the same" echo " -n, -notebook [...] -- start the Sage notebook (options are the same"
echo " as for the notebook command in Sage)" echo " as for the notebook command in Sage)"
@@ -86,16 +79,10 @@ usage_advanced() { @@ -88,13 +81,9 @@ usage_advanced() {
echo " -gap [...] -- run Sage's Gap with given arguments"
echo " -gdb -- run Sage under the control of gdb"
echo " -gp [...] -- run Sage's PARI/GP calculator with given arguments" echo " -gp [...] -- run Sage's PARI/GP calculator with given arguments"
- echo " -hg [...] -- run Sage's Mercurial with given arguments"
echo " -ipython [...] -- run Sage's IPython using the default environment (not" echo " -ipython [...] -- run Sage's IPython using the default environment (not"
echo " Sage), passing additional options to IPython" echo " Sage), passing additional options to IPython"
- echo " -kash [...] -- run Sage's Kash with given arguments" - echo " -kash [...] -- run Sage's Kash with given arguments"
- test -x "$SAGE_LOCAL/bin/kash" || \ - command -v kash &>/dev/null || \
- echo " (not installed currently, run sage -i kash)" echo " (not installed currently, run sage -i kash)"
echo " -lisp [...] -- run Lisp interpreter included with Sage" echo " -lisp [...] -- run Lisp interpreter included with Sage"
echo " -M2 [...] -- run Sage's Macaulay2 with given arguments" echo " -M2 [...] -- run Sage's Macaulay2 with given arguments"
- test -x "$SAGE_LOCAL/bin/M2" || \ - 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 " -maxima [...] -- run Sage's Maxima with given arguments"
echo " -mwrank [...] -- run Sage's mwrank with given arguments" echo " -mwrank [...] -- run Sage's mwrank with given arguments"
echo " -python [...] -- run the Python interpreter" echo " -python [...] -- run the Python interpreter"
@@ -109,83 +96,10 @@ usage_advanced() { @@ -108,80 +97,10 @@ usage_advanced() {
echo echo
#### 1.......................26..................................................78 #### 1.......................26..................................................78
#### |.....................--.|...................................................| #### |.....................--.|...................................................|
@ -85,10 +82,10 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
- echo " -standard -- list all standard packages that can be installed" - echo " -standard -- list all standard packages that can be installed"
- #echo " -update -- download latest non-optional Sage packages (do not build them)" - #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 " -update-build -- build and install all downloaded non-optional Sage packages"
- echo " -upgrade [url] -- download, build and install standard packages from" - echo " -upgrade [version] -- download, build and install the given version. Here,"
- echo " given url. If url not given, automatically selects a" - echo " 'version' is a git branch or tag name. Useful values"
- echo " suitable mirror. If url='ask', it lets you select" - echo " are 'master' (the currend development version, this"
- echo " the mirror (uses SAGE_SERVER as default)." - echo " is the default) or a version number like '5.13'."
- -
- echo - echo
- #### 1.......................26..................................................78 - #### 1.......................26..................................................78
@ -104,12 +101,9 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
- echo " -ba [branch] -- same as -b and rebuild all Cython code" - echo " -ba [branch] -- same as -b and rebuild all Cython code"
- echo " -ba-force [branch] -- same as -ba, but don't query before rebuilding" - echo " -ba-force [branch] -- same as -ba, but don't query before rebuilding"
- echo " -br [branch] -- switch to, build, and run Sage given branch" - echo " -br [branch] -- switch to, build, and run Sage given branch"
- echo " -branch -- print the current Sage branch"
- echo " -bt [...] -- build and test, options like -t below" - echo " -bt [...] -- build and test, options like -t below"
- echo " -btp <N> [...] -- build and test parallel, options like -tp below" - echo " -btp <N> [...] -- build and test parallel, options like -tp below"
- echo " -btnew [...] -- build and test modified files, options like -tnew" - echo " -btnew [...] -- build and test modified files, options like -tnew"
- echo " -clone [new branch] -- clone a new branch of the Sage library from the"
- echo " current branch"
- echo " -fixdoctests <file.py> [output_file] [--long]" - echo " -fixdoctests <file.py> [output_file] [--long]"
- echo " -- writes a new version of file.py to output_file" - echo " -- writes a new version of file.py to output_file"
- echo " (defaults: to file.py.out) that will pass the doctests." - echo " (defaults: to file.py.out) that will pass the doctests."
@ -148,7 +142,7 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
echo " -search_src <string> -- search through all the Sage library code for string" 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 " -search_doc <string> -- search through the Sage documentation for string"
echo " -grep <string> -- same as -search_src" echo " -grep <string> -- same as -search_src"
@@ -205,19 +119,6 @@ usage_advanced() { @@ -201,17 +120,6 @@ usage_advanced() {
echo echo
#### 1.......................26..................................................78 #### 1.......................26..................................................78
#### |.....................--.|...................................................| #### |.....................--.|...................................................|
@ -158,9 +152,7 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
- echo " -crap sage-ver.tar -- detect suspicious garbage in sage source tarball" - echo " -crap sage-ver.tar -- detect suspicious garbage in sage source tarball"
- echo " -pkg <dir> -- create Sage package dir.spkg from a given directory" - 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 " -pkg_nc <dir> -- as -pkg, but do not compress the package"
- echo " -rsyncdist VER -- build an rsyncable source distribution of Sage (you" - echo " -sdist -- build a source distribution of Sage"
- echo " must first run sage -sdist VER for this to work)"
- echo " -sdist VER -- build a source distribution of Sage"
- -
- echo - echo
- #### 1.......................26..................................................78 - #### 1.......................26..................................................78
@ -168,7 +160,7 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
echo "Valgrind memory debugging:" echo "Valgrind memory debugging:"
echo " -cachegrind -- run Sage using Valgrind's cachegrind tool. The log" echo " -cachegrind -- run Sage using Valgrind's cachegrind tool. The log"
echo " files are named sage-cachegrind.PID can be found in" echo " files are named sage-cachegrind.PID can be found in"
@@ -231,9 +132,6 @@ usage_advanced() { @@ -225,9 +133,6 @@ usage_advanced() {
echo " -memcheck -- run Sage using Valgrind's memcheck tool. The log" echo " -memcheck -- run Sage using Valgrind's memcheck tool. The log"
echo " files are named sage-memcheck.PID can be found in" echo " files are named sage-memcheck.PID can be found in"
echo " $DOT_SAGE" echo " $DOT_SAGE"
@ -178,14 +170,16 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
echo " -valgrind -- this is an alias for -memcheck" echo " -valgrind -- this is an alias for -memcheck"
echo echo
echo "You can also use -- before a long option, e.g., 'sage --optional'." echo "You can also use -- before a long option, e.g., 'sage --optional'."
@@ -253,15 +151,6 @@ if [ "$1" = '--nodotsage' ]; then @@ -256,17 +161,6 @@ if [ "$1" = '-upgrade' -o "$1" = "--upgr
exit $status
fi fi
-# Make sure this doesn't produce output (in case we use this in scripts).
-. "$SAGE_ROOT/spkg/bin/sage-env" >&2 -# 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 -if [ $? -ne 0 ]; then
- echo >&2 "Error setting environment variables by sourcing '$SAGE_ROOT/spkg/bin/sage-env';" - echo >&2 "Error setting environment variables by sourcing '$0-env';"
- echo >&2 "possibly contact sage-devel (see http://groups.google.com/group/sage-devel)." - echo >&2 "possibly contact sage-devel (see http://groups.google.com/group/sage-devel)."
- exit 1 - exit 1
-fi -fi
@ -194,7 +188,7 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
if [ $# -gt 0 ]; then if [ $# -gt 0 ]; then
if [ "$1" = '-h' -o "$1" = '-?' -o "$1" = '-help' -o "$1" = '--help' ]; then if [ "$1" = '-h' -o "$1" = '-?' -o "$1" = '-help' -o "$1" = '--help' ]; then
usage usage
@@ -274,25 +163,11 @@ fi @@ -279,25 +173,11 @@ fi
# Prepare for running Sage, either interactively or non-interactively. # Prepare for running Sage, either interactively or non-interactively.
sage_setup() { sage_setup() {
@ -220,7 +214,7 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
if [ ! -d "$IPYTHONDIR" ]; then if [ ! -d "$IPYTHONDIR" ]; then
# make sure that $DOT_SAGE exists so that ipython will happily # make sure that $DOT_SAGE exists so that ipython will happily
# create its config directories there. If DOT_SAGE doesn't # create its config directories there. If DOT_SAGE doesn't
@@ -303,20 +178,6 @@ sage_setup() { @@ -308,20 +188,6 @@ sage_setup() {
} }
@ -241,20 +235,7 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
# Start an interactive Sage session, this function never returns. # Start an interactive Sage session, this function never returns.
interactive_sage() { interactive_sage() {
sage_setup sage_setup
@@ -357,12 +218,6 @@ if [ "$1" = '-root' -o "$1" = '--root' @@ -371,11 +237,6 @@ if [ "$1" = '-axiom' -o "$1" = '--axiom'
exit 0
fi
-if [ "$1" = '-branch' -o "$1" = '--branch' ]; then
- cd "$SAGE_ROOT/devel/sage"
- pwd -P | sed 's|.*/||; s|^sage-||'
- exit $?
-fi
-
#####################################################################
# Run Sage's versions of the standard Algebra/Geometry etc. software
#####################################################################
@@ -372,29 +227,24 @@ if [ "$1" = '-axiom' -o "$1" = '--axiom'
exec axiom "$@" exec axiom "$@"
fi fi
@ -265,112 +246,37 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
- -
if [ "$1" = '-gap' -o "$1" = '--gap' ]; then if [ "$1" = '-gap' -o "$1" = '--gap' ]; then
shift shift
- exec "$SAGE_LOCAL/bin/gap" "$@" exec gap "$@"
+ exec gap "$@" @@ -388,7 +249,7 @@ fi
fi
if [ "$1" = '-gp' -o "$1" = '--gp' ]; then
shift
- exec "$SAGE_LOCAL/bin/gp" "$@"
+ exec gp "$@"
fi
if [ "$1" = '-singular' -o "$1" = '--singular' ]; then if [ "$1" = '-singular' -o "$1" = '--singular' ]; then
shift shift
- exec "$SAGE_LOCAL/bin/singular" "$@" - exec singular "$@"
+ exec Singular "$@" + exec Singular "$@"
fi fi
if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then
shift @@ -416,16 +277,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ]
- exec "$SAGE_LOCAL/bin/sqlite3" "$@" exec ecl "$@"
+ exec sqlite3 "$@"
fi fi
if [ "$1" = '-sws2rst' -o "$1" = '--sws2rst' ]; then
@@ -404,47 +254,37 @@ fi
if [ "$1" = '-twistd' -o "$1" = '--twistd' ]; then
shift
- exec "$SAGE_LOCAL/bin/twistd" "$@"
+ exec twistd "$@"
fi
if [ "$1" = '-ecl' -o "$1" = '--ecl' ]; then
shift
- exec "$SAGE_LOCAL/bin/ecl" "$@"
+ exec ecl "$@"
fi
if [ "$1" = '-lisp' -o "$1" = '--lisp' ]; then
shift
- exec "$SAGE_LOCAL/bin/ecl" "$@"
-fi
-
-if [ "$1" = '-kash' -o "$1" = '--kash' ]; then -if [ "$1" = '-kash' -o "$1" = '--kash' ]; then
- shift - shift
- exec "$SAGE_LOCAL/bin/kash" "$@" - exec kash "$@"
-fi -fi
- -
-if [ "$1" = '-fixdoctests' -o "$1" = '--fixdoctests' ]; then -if [ "$1" = '-fixdoctests' -o "$1" = '--fixdoctests' ]; then
- shift - shift
- exec sage-fixdoctests "$@" - exec sage-fixdoctests "$@"
+ exec ecl "$@"
fi
if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
shift
- exec "$SAGE_LOCAL/bin/maxima" "$@"
+ exec maxima "$@"
fi
if [ "$1" = '-mwrank' -o "$1" = '--mwrank' ]; then
shift
- exec "$SAGE_LOCAL/bin/mwrank" "$@"
+ exec mwrank "$@"
fi
if [ "$1" = '-M2' -o "$1" = '--M2' ]; then
shift
- exec "$SAGE_LOCAL/bin/M2" "$@"
+ exec M2 "$@"
fi
if [ "$1" = '-scons' -o "$1" = '--scons' ]; then
shift
- exec "$SAGE_LOCAL/bin/scons" "$@"
+ exec scons "$@"
fi
if [ "$1" = '-python' -o "$1" = '--python' ]; then
@@ -454,12 +294,12 @@ fi
if [ "$1" = '-R' -o "$1" = '--R' ]; then
shift
- exec "$SAGE_LOCAL/bin/R" "$@"
+ exec R "$@"
fi
if [ "$1" = '-ipython' -o "$1" = '--ipython' ]; then
shift
- exec "$SAGE_LOCAL/bin/ipython" "$@"
+ exec ipython "$@"
fi
if [ "$1" = '-sh' -o "$1" = '--sh' ]; then
@@ -580,28 +420,6 @@ EOF
exit $status
fi
-if [ "$1" = '-hg' -o "$1" = '--hg' ]; then
- shift
- # Disable HGPLAIN, so we use all user defaults
- # (both in $SAGE_LOCAL/etc/mercurial and $HOME/.hgrc)
- unset HGPLAIN
- exec "$SAGE_LOCAL/bin/hg" "$@"
-fi -fi
- -
-##################################################################### if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
shift
exec maxima "$@"
@@ -585,20 +436,6 @@ EOF
fi
#####################################################################
-# Test coverage of a module? -# Test coverage of a module?
-##################################################################### -#####################################################################
- -
@ -384,10 +290,11 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
- exec sage-coverageall "$@" - exec sage-coverageall "$@"
-fi -fi
- -
##################################################################### -#####################################################################
# File conversion # File conversion
##################################################################### #####################################################################
@@ -617,36 +435,15 @@ if [ "$1" = '-rst2sws' -o "$1" = '--rst2
@@ -613,36 +450,15 @@ if [ "$1" = '-rst2sws' -o "$1" = '--rst2
fi fi
##################################################################### #####################################################################
@ -424,7 +331,7 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then
shift shift
sage-cleaner &>/dev/null & sage-cleaner &>/dev/null &
@@ -665,79 +462,7 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep @@ -661,58 +477,12 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep
exit 0 exit 0
fi fi
@ -440,26 +347,11 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
- interactive_sage - interactive_sage
-fi -fi
- -
-if [ "$1" = '-r' ]; then if [ "$1" = '-r' ]; then
- shift shift
- if [ "$1" != "" ]; then interactive_sage
- cd "$SAGE_ROOT/devel/" fi
- if [ ! -d "sage-$1" ]; then
- echo >&2 "No such branch '$SAGE_ROOT/devel/sage-$1'"
- echo >&2 "Use 'sage --clone' to create a new branch."
- exit 1
- fi
- # On Solaris (and perhaps other systems), "ln -snf FILE LINK"
- # doesn't remove LINK and then relink it, so we need to first
- # delete LINK -- in this case, SAGE_ROOT/devel/sage -- and then
- # create a new link. We use the full path name to make sure we
- # remove the correct file.
- rm -f "$SAGE_ROOT/devel/sage"
- ln -s "sage-$1" sage
- fi
- interactive_sage
-fi
-
-if [ "$1" = '-ba' ]; then -if [ "$1" = '-ba' ]; then
- shift - shift
- echo " *** WARNING ***" - echo " *** WARNING ***"
@ -491,12 +383,6 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
- exec sage-sync-build.py "$@" - exec sage-sync-build.py "$@"
-fi -fi
- -
-if [ "$1" = '-clone' -o "$1" = "--clone" ]; then
- shift
- time sage-clone "$@"
- exit $?
-fi
-
-if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" = '-tp' -o "$1" = '-btp' ]; then -if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" = '-tp' -o "$1" = '-btp' ]; then
- if [ "$1" = '-bt' -o "$1" = '-btp' ]; then - if [ "$1" = '-bt' -o "$1" = '-btp' ]; then
- build_sage - build_sage
@ -505,7 +391,7 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
if [ ! -f "$DOT_SAGE"/init.sage ]; then if [ ! -f "$DOT_SAGE"/init.sage ]; then
echo >&2 "init.sage does not exist ... creating" echo >&2 "init.sage does not exist ... creating"
touch "$DOT_SAGE"/init.sage touch "$DOT_SAGE"/init.sage
@@ -753,10 +478,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" @@ -728,10 +498,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1"
fi fi
fi fi
@ -517,7 +403,7 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
shift shift
SAGE_BANNER="no" SAGE_BANNER="no"
sage_setup sage_setup
@@ -770,12 +492,6 @@ if [ "$1" = '-testall' -o "$1" = "--test @@ -745,12 +512,6 @@ if [ "$1" = '-testall' -o "$1" = "--test
exec sage-runtests -a "$@" exec sage-runtests -a "$@"
fi fi
@ -530,7 +416,7 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
if [ "$1" = '-c' ]; then if [ "$1" = '-c' ]; then
shift shift
SAGE_BANNER="no" SAGE_BANNER="no"
@@ -784,166 +500,6 @@ if [ "$1" = '-c' ]; then @@ -759,124 +520,6 @@ if [ "$1" = '-c' ]; then
exec sage-eval "$@" exec sage-eval "$@"
fi fi
@ -564,7 +450,7 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
- PKG_NAME=`echo "$PKG" | sed -e "s/\.spkg$//"` - PKG_NAME=`echo "$PKG" | sed -e "s/\.spkg$//"`
- PKG_NAME=`basename "$PKG_NAME"` - PKG_NAME=`basename "$PKG_NAME"`
- -
- "$SAGE_ROOT"/spkg/pipestatus \ - "$SAGE_ROOT"/build/pipestatus \
- "sage-spkg $OPTINFO $OPTF $OPTS $OPTC '$PKG' 2>&1" \ - "sage-spkg $OPTINFO $OPTF $OPTS $OPTC '$PKG' 2>&1" \
- "(trap '' SIGINT; tee -a '$SAGE_ROOT/logs/install.log' '$SAGE_LOGS/$PKG_NAME.log')" - "(trap '' SIGINT; tee -a '$SAGE_ROOT/logs/install.log' '$SAGE_LOGS/$PKG_NAME.log')"
- # Do not try to install further packages if one failed - # Do not try to install further packages if one failed
@ -627,12 +513,9 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
-fi -fi
- -
-if [ "$1" = '-sdist' -o "$1" = "--sdist" ]; then -if [ "$1" = '-sdist' -o "$1" = "--sdist" ]; then
- if [ $# -ne 2 ]; then
- echo >&2 "** MISSING VERSION NUMBER! **"
- exit 2
- fi
- maybe_sage_location - maybe_sage_location
- exec sage-sdist $2 "$SAGE_ROOT" - shift
- exec sage-sdist "$@"
-fi -fi
- -
-if [ "$1" = '-rsyncdist' -o "$1" = "--rsyncdist" ]; then -if [ "$1" = '-rsyncdist' -o "$1" = "--rsyncdist" ]; then
@ -645,48 +528,9 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
-fi -fi
- -
-if [ "$1" = '-bdist' -o "$1" = "--bdist" ]; then -if [ "$1" = '-bdist' -o "$1" = "--bdist" ]; then
- if [ $# -ne 2 ]; then
- echo >&2 "** MISSING VERSION NUMBER! **"
- exit 2
- fi
- maybe_sage_location - maybe_sage_location
- cd "$SAGE_ROOT"
- exec sage-bdist $2 "$SAGE_ROOT"
-fi
-
-#if [ "$1" = '-update' ]; then
-# sage-update
-# exit $?
-#fi
-
-#if [ "$1" = '-update-build' -o "$1" = "--update-build" ]; then
-# sage-update-build
-# sage-update-build
-# exit $?
-#fi
-
-if [ "$1" = '-upgrade' -o "$1" = "--upgrade" ]; then
- shift - shift
- cd "$SAGE_ROOT" - exec sage-bdist "$@"
-
- # People often move the Sage install right before doing the upgrade, so it's
- # important to fix any path hardcoding issues first, or certain library
- # links will fail.
- sage-location || exit $?
-
- # Run sage-upgrade twice since when installing sage-scripts and a
- # running script changes, it gets confused and exits with an error.
- # Running again (with the script replaced) then fixes the problem.
- sage-upgrade "$@"
- if [ $? -eq 2 ]; then # this exit code means the user elected not to do the upgrade at all.
- exit 2
- fi
- echo "Double checking that all packages have been installed."
- sage-upgrade "$@" || exit $?
-
- # Check that Sage still works
- sage-starts
- exit $?
-fi -fi
- -
-if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then -if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then
@ -697,7 +541,7 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
shift shift
sage_setup sage_setup
@@ -992,12 +548,6 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca @@ -925,12 +568,6 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca
exec sage-callgrind "$@" exec sage-callgrind "$@"
fi fi
@ -710,9 +554,9 @@ diff -up sage-5.13/spkg/bin/sage.orig sage-5.13/spkg/bin/sage
if [ "$1" = '-startuptime' -o "$1" = '--startuptime' ]; then if [ "$1" = '-startuptime' -o "$1" = '--startuptime' ]; then
exec sage-startuptime.py "$@" exec sage-startuptime.py "$@"
fi fi
diff -up sage-5.13/spkg/build/sage_scripts-5.13/sage-runtests.orig sage-5.13/spkg/build/sage_scripts-5.13/sage-runtests diff -up src/bin/sage-runtests.orig src/bin/sage-runtests
--- sage-5.13/spkg/build/sage_scripts-5.13/sage-runtests.orig 2014-01-28 15:46:59.796154543 -0200 --- src/bin/sage-runtests.orig 2014-02-07 11:09:24.776638428 -0200
+++ sage-5.13/spkg/build/sage_scripts-5.13/sage-runtests 2014-01-28 15:47:42.457156177 -0200 +++ src/bin/sage-runtests 2014-02-07 11:09:41.780639079 -0200
@@ -54,10 +54,6 @@ if __name__ == "__main__": @@ -54,10 +54,6 @@ if __name__ == "__main__":
help="run doctests using Valgrind's cachegrind tool. The log " help="run doctests using Valgrind's cachegrind tool. The log "
"files are named sage-cachegrind.PID and can be found in " + "files are named sage-cachegrind.PID and can be found in " +
@ -724,9 +568,9 @@ diff -up sage-5.13/spkg/build/sage_scripts-5.13/sage-runtests.orig sage-5.13/spk
parser.add_option("-f", "--failed", action="store_true", default=False, parser.add_option("-f", "--failed", action="store_true", default=False,
help="doctest only those files that failed in the previous run") help="doctest only those files that failed in the previous run")
diff -up sage-5.13/spkg/build/sage_scripts-5.13/sage-valgrind.orig sage-5.13/spkg/build/sage_scripts-5.13/sage-valgrind diff -up src/bin/sage-valgrind.orig src/bin/sage-valgrind
--- sage-5.13/spkg/build/sage_scripts-5.13/sage-valgrind.orig 2014-01-28 15:46:59.800154543 -0200 --- src/bin/sage-valgrind.orig 2014-02-07 11:09:56.469639641 -0200
+++ sage-5.13/spkg/build/sage_scripts-5.13/sage-valgrind 2014-01-28 15:47:20.081155320 -0200 +++ src/bin/sage-valgrind 2014-02-07 11:10:06.804640037 -0200
@@ -11,7 +11,7 @@ fi @@ -11,7 +11,7 @@ fi
LOG="$DOT_SAGE"/valgrind/sage-memcheck.%p LOG="$DOT_SAGE"/valgrind/sage-memcheck.%p
echo "Log file is $LOG" echo "Log file is $LOG"

View file

@ -1,21 +1,21 @@
diff -up sage-5.13/spkg/build/sage-5.13/sage/env.py.orig sage-5.13/spkg/build/sage-5.13/sage/env.py diff -up src/sage/env.py.orig src/sage/env.py
--- sage-5.13/spkg/build/sage-5.13/sage/env.py.orig 2013-08-12 15:14:58.586048479 -0300 --- src/sage/env.py.orig 2014-02-07 12:50:28.534870630 -0200
+++ sage-5.13/spkg/build/sage-5.13/sage/env.py 2013-08-12 15:15:55.102050643 -0300 +++ src/sage/env.py 2014-02-07 12:51:07.014872104 -0200
@@ -85,7 +85,7 @@ _add_variable_or_fallback('HOSTNAME', @@ -85,7 +85,7 @@ _add_variable_or_fallback('HOSTNAME',
_add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid()) _add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid())
# bunch of sage directories and files # bunch of sage directories and files
-_add_variable_or_fallback('SAGE_ROOT', None) -_add_variable_or_fallback('SAGE_ROOT', None)
+_add_variable_or_fallback('SAGE_ROOT', '@@SAGE_ROOT@@') +_add_variable_or_fallback('SAGE_ROOT', '@@SAGE_ROOT@@')
_add_variable_or_fallback('SAGE_LOCAL', opj('$SAGE_ROOT', 'local')) _add_variable_or_fallback('SAGE_LOCAL', opj('$SAGE_ROOT', 'local'))
_add_variable_or_fallback('SAGE_ETC', opj('$SAGE_LOCAL', 'etc'))
_add_variable_or_fallback('SAGE_SHARE', opj('$SAGE_LOCAL', 'share')) _add_variable_or_fallback('SAGE_SHARE', opj('$SAGE_LOCAL', 'share'))
@@ -98,7 +98,7 @@ _add_variable_or_fallback('SAGE_LIB',
@@ -95,7 +95,7 @@ _add_variable_or_fallback('SAGE_EXTCODE' _add_variable_or_fallback('SAGE_EXTCODE', opj('$SAGE_SHARE', 'sage', 'ext'))
_add_variable_or_fallback('SAGE_PACKAGES', opj('$SAGE_ROOT', 'spkg'))
_add_variable_or_fallback('SAGE_LOGS', opj('$SAGE_ROOT', 'logs', 'pkgs')) _add_variable_or_fallback('SAGE_LOGS', opj('$SAGE_ROOT', 'logs', 'pkgs'))
_add_variable_or_fallback('SAGE_SPKG_INST', opj('$SAGE_ROOT', 'spkg', 'installed')) _add_variable_or_fallback('SAGE_SPKG_INST', opj('$SAGE_LOCAL', 'var', 'lib', 'sage', 'installed'))
-_add_variable_or_fallback('SAGE_DOC', opj('$SAGE_ROOT', 'devel', 'sage', 'doc')) -_add_variable_or_fallback('SAGE_DOC', opj('$SAGE_SRC', 'doc'))
+_add_variable_or_fallback('SAGE_DOC', '@@SAGE_DOC@@') +_add_variable_or_fallback('SAGE_DOC', '@@SAGE_DOC@@')
_add_variable_or_fallback('DOT_SAGE', opj(os.environ.get('HOME','$SAGE_ROOT'), '.sage')) _add_variable_or_fallback('DOT_SAGE', opj(os.environ.get('HOME','$SAGE_ROOT'), '.sage'))
_add_variable_or_fallback('SAGE_DOT_GIT', opj('$SAGE_ROOT', '.git'))
# SAGE_LIB is the site-packages directory if the sage library

View file

@ -4,18 +4,12 @@
# for quicker test with packages not yet in fedora # for quicker test with packages not yet in fedora
%global packager_debug 0 %global packager_debug 0
# for quicker fedora-review tests without downloading the main tarball
%global download_tarball 0
# not functional due to missing jar dependencies # not functional due to missing jar dependencies
%global with_sage3d 0 %global with_sage3d 0
# use an workaround to match upstream sagemath patched sphinx # use an workaround to match upstream sagemath patched sphinx
%global with_sphinx_hack 1 %global with_sphinx_hack 1
# sagemath works only with pexpect-2.0
%global with_sage_pexpect 1
# https://bugzilla.redhat.com/show_bug.cgi?id=909510 # https://bugzilla.redhat.com/show_bug.cgi?id=909510
%global have_lrcalc 1 %global have_lrcalc 1
@ -46,14 +40,14 @@
%global SAGE_TIMEOUT 60 %global SAGE_TIMEOUT 60
%global SAGE_TIMEOUT_LONG 180 %global SAGE_TIMEOUT_LONG 180
%global conway_polynomials_pkg conway_polynomials-0.4.p0 %global conway_polynomials_pkg conway_polynomials-0.4
%global elliptic_curves_pkg elliptic_curves-0.7 %global elliptic_curves_pkg elliptic_curves-0.7
%global flintqs_pkg flintqs-20070817.p8 %global flintqs_pkg flintqs-20070817
%global graphs_pkg graphs-20120404.p4 %global graphs_pkg graphs-20120404
%global pexpect_pkg pexpect-2.0.p5 %global pexpect_pkg pexpect-2.0
%global polytopes_db_pkg polytopes_db-20120220 %global polytopes_db_pkg polytopes_db-20120220
%global rubiks_pkg rubiks-20070912.p18 %global rubiks_pkg rubiks-20070912
%global sagenb_pkg sagenb-0.10.7.2 %global sagenb_pkg sagenb-0.10.8.2
%global sagetex_pkg sagetex-2.3.4 %global sagetex_pkg sagetex-2.3.4
%global SAGE_ROOT %{_libdir}/sagemath %global SAGE_ROOT %{_libdir}/sagemath
@ -61,24 +55,20 @@
%global SAGE_SRC %{SAGE_ROOT}/src %global SAGE_SRC %{SAGE_ROOT}/src
%global SAGE_DOC %{_docdir}/%{name} %global SAGE_DOC %{_docdir}/%{name}
%global SAGE_SHARE %{_datadir}/sagemath %global SAGE_SHARE %{_datadir}/sagemath
%global SAGE_EXTCODE %{SAGE_SHARE}/ext %global SAGE_ETC %{SAGE_SHARE}/etc
%global SAGE_PYTHONPATH %{SAGE_ROOT}/site-packages %global SAGE_PYTHONPATH %{SAGE_ROOT}/site-packages
Name: sagemath Name: sagemath
Group: Applications/Engineering Group: Applications/Engineering
Summary: A free open-source mathematics software system Summary: A free open-source mathematics software system
Version: 5.13 Version: 6.1.1
Release: 1%{?dist} Release: 1%{?dist}
# The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file # The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
# Additionally, every $files section has a comment with the license name # Additionally, every $files section has a comment with the license name
# before files with that license # before files with that license
License: ASL 2.0 and BSD and GPL+ and GPLv2+ and LGPLv2+ and MIT and Public Domain License: ASL 2.0 and BSD and GPL+ and GPLv2+ and LGPLv2+ and MIT and Public Domain
URL: http://www.sagemath.org URL: http://www.sagemath.org
%if %{download_tarball} Source0: http://boxen.math.washington.edu/home/%{name}/sage-mirror/src/sage-%{version}.tar.gz
Source0: http://boxen.math.washington.edu/home/%{name}/sage-mirror/src/sage-%{version}.tar
%else
Source0: sage-%{version}.tar
%endif
Source1: gprc.expect Source1: gprc.expect
Source2: makecmds.sty Source2: makecmds.sty
# not installed by jmol package, use one in sagemath jmol spkg # not installed by jmol package, use one in sagemath jmol spkg
@ -356,7 +346,7 @@ Group: Applications/Engineering
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: %{name}-data-conway_polynomials = %{version}-%{release} Requires: %{name}-data-conway_polynomials = %{version}-%{release}
Requires: %{name}-data-elliptic_curves = %{version}-%{release} Requires: %{name}-data-elliptic_curves = %{version}-%{release}
Requires: %{name}-data-extcode = %{version}-%{release} Requires: %{name}-data-etc = %{version}-%{release}
Requires: %{name}-data-graphs = %{version}-%{release} Requires: %{name}-data-graphs = %{version}-%{release}
Requires: %{name}-data-polytopes_db = %{version}-%{release} Requires: %{name}-data-polytopes_db = %{version}-%{release}
BuildArch: noarch BuildArch: noarch
@ -391,13 +381,14 @@ Includes two databases:
* William Stein's database of interesting curves * William Stein's database of interesting curves
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%package data-extcode %package data-etc
Summary: Extcode for Sagemath Summary: Extcode for Sagemath
Group: Applications/Engineering Group: Applications/Engineering
Requires: %{name}-data = %{version}-%{release} Requires: %{name}-data = %{version}-%{release}
Obsoletes: %{name}-data-extcode < %{version}
BuildArch: noarch BuildArch: noarch
%description data-extcode %description data-etc
Collection of scripts and interfaces to sagemath. Collection of scripts and interfaces to sagemath.
#------------------------------------------------------------------------ #------------------------------------------------------------------------
@ -555,71 +546,86 @@ computations, and plots from the Sage mathematics software suite
%prep %prep
%setup -q -n sage-%{version} %setup -q -n sage-%{version}
mkdir -p spkg/build pushd build/pkgs/conway_polynomials
pushd spkg/build tar jxf ../../../upstream/%{conway_polynomials_pkg}.tar.bz2
for pkg in \ mv %{conway_polynomials_pkg} src
%{conway_polynomials_pkg} \
%{elliptic_curves_pkg} \
extcode-%{version} \
%{flintqs_pkg} \
%{graphs_pkg} \
%if %{with_sage_pexpect}
%{pexpect_pkg} \
%endif
%{polytopes_db_pkg} \
%{rubiks_pkg} \
%{sagenb_pkg} \
%{sagetex_pkg} \
sage-%{version} \
sage_scripts-%{version} \
; do
tar jxf ../standard/$pkg.spkg
done
# apply in spkgs that do not have patches already applied
# or that actually have patches
pushd %{flintqs_pkg}/src
for diff in `ls ../patches/*.patch`; do
patch -p1 < $diff
done
popd popd
pushd %{sagenb_pkg}/src pushd build/pkgs/elliptic_curves
tar zxf %{sagenb_pkg}.tar.gz tar jxf ../../../upstream/%{elliptic_curves_pkg}.tar.bz2
mv %{sagenb_pkg} sagenb mv %{elliptic_curves_pkg} src
popd popd
%if %{with_sage_pexpect} pushd build/pkgs/flintqs
pushd %{pexpect_pkg}/src tar jxf ../../../upstream/%{flintqs_pkg}.tar.bz2
for diff in `ls ../patches/*.patch ../patches/*.diff`; do mv %{flintqs_pkg} src
pushd src
for diff in `ls ../patches/*.patch`; do
patch -p1 < $diff patch -p1 < $diff
done done
popd popd
%endif popd
pushd %{rubiks_pkg}
cp patches/dietz-mcube-Makefile src/dietz/mcube/Makefile pushd build/pkgs/graphs
cp patches/dietz-solver-Makefile src/dietz/solver/Makefile tar jxf ../../../upstream/%{graphs_pkg}.tar.bz2
cp patches/dietz-cu2-Makefile src/dietz/cu2/Makefile mv %{graphs_pkg} src
cp patches/reid-Makefile src/reid/Makefile popd
pushd build/pkgs/pexpect
tar jxf ../../../upstream/%{pexpect_pkg}.tar.bz2
mv %{pexpect_pkg} src
pushd src
for diff in `ls ../patches/*.patch`; do
patch -p1 < $diff
done
popd popd
popd popd
%patch0 -p1 pushd build/pkgs/polytopes_db
%patch1 -p1 tar jxf ../../../upstream/%{polytopes_db_pkg}.tar.bz2
%patch2 -p1 mv %{polytopes_db_pkg} src
%patch3 -p1 popd
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
pushd spkg/build/sage-%{version} pushd build/pkgs/rubiks
tar jxf ../../../upstream/%{rubiks_pkg}.tar.bz2
mv %{rubiks_pkg} src
pushd src
cp ../patches/dietz-mcube-Makefile dietz/mcube/Makefile
cp ../patches/dietz-solver-Makefile dietz/solver/Makefile
cp ../patches/dietz-cu2-Makefile dietz/cu2/Makefile
cp ../patches/reid-Makefile reid/Makefile
popd
popd
pushd build/pkgs/sagenb
tar xf ../../../upstream/%{sagenb_pkg}.tar
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
mv %{sagetex_pkg} src
popd
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
%patch11
%patch12
%patch13
pushd src
mkdir -p doc/pt/a_tour_of_sage/ mkdir -p doc/pt/a_tour_of_sage/
cp -fa doc/en/a_tour_of_sage/*.png doc/pt/a_tour_of_sage/ cp -fa doc/en/a_tour_of_sage/*.png doc/pt/a_tour_of_sage/
%patch14 -p1 %patch14 -p1
@ -627,58 +633,60 @@ cp -fa doc/en/a_tour_of_sage/*.png doc/pt/a_tour_of_sage/
%patch16 -p1 %patch16 -p1
popd popd
%patch17 -p1 %patch17
%patch18 -p1 %patch18
%patch19 -p1 %patch19
%patch20 -p1 %patch20
%patch21 -p1 %patch21
%if %{have_lrcalc} %if %{have_lrcalc}
%patch22 -p1 %patch22
%endif %endif
# other coin-or packages are build requires or coin-or-Cbc # other coin-or packages are build requires or coin-or-Cbc
%if %{have_coin_or_Cbc} %if %{have_coin_or_Cbc}
%patch23 -p1 %patch23
%endif %endif
%patch24 -p1 %patch24
%if %{have_fes} %if %{have_fes}
%patch25 -p1 %patch25
%endif %endif
%patch26 -p1 %patch26
%patch27 -p1 %patch27
%patch28 -p1 %patch28
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \ sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
-e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \ -e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
-i spkg/build/sage-%{version}/sage/env.py -i src/sage/env.py
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# ensure proper/preferred libatlas is in linker path # ensure proper/preferred libatlas is in linker path
pushd spkg/build/sage-%{version} perl -pi -e 's|^(extra_link_args = ).*|$1\["-L%{_libdir}/atlas"\]|;' src/sage/misc/cython.py
perl -pi -e 's|^(extra_link_args = ).*|$1\["-L%{_libdir}/atlas"\]|;' sage/misc/cython.py %if 0%{?fedora}
# some .c files are not (re)generated perl -pi -e 's|return 'atlas'|return 'satlas'|;' src/sage/misc/cython.py
find . \( -name \*.pyx -o -name \*.pxd \) | xargs touch %endif
popd # some .c files are not (re)generated
find src/sage \( -name \*.pyx -o -name \*.pxd \) | xargs touch
# remove bundled jar files before build # remove bundled jar files before build
rm spkg/build/%{sagenb_pkg}/src/sagenb/sagenb/data/sage3d/lib/sage3d.jar rm build/pkgs/sagenb/src/%{sagenb_pkg}/sagenb/data/sage3d/lib/sage3d.jar
# remove binary egg # remove binary egg
rm -r spkg/build/%{sagenb_pkg}/src/sagenb/sagenb.egg-info rm -r build/pkgs/sagenb/src/%{sagenb_pkg}/sagenb.egg-info
######################################################################## ########################################################################
%build %build
export CC=%{__cc}
export CFLAGS="%{optflags}" export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}" export CXXFLAGS="%{optflags}"
export SAGE_ROOT=%{buildroot}%{SAGE_ROOT} export SAGE_ROOT=%{buildroot}%{SAGE_ROOT}
export SAGE_LOCAL=%{buildroot}%{SAGE_LOCAL} export SAGE_LOCAL=%{buildroot}%{SAGE_LOCAL}
# Avoid buildroot in gcc command line (use _builddir instead) # Avoid buildroot in gcc command line (use _builddir instead)
export SAGE_SRC="$PWD/spkg/build/sage-%{version}" export SAGE_SRC="$PWD/src"
export SAGE_FORTRAN=%{_bindir}/gfortran export SAGE_FORTRAN=%{_bindir}/gfortran
export SAGE_FORTRAN_LIB=`gfortran --print-file-name=libgfortran.so` export SAGE_FORTRAN_LIB=`gfortran --print-file-name=libgfortran.so`
export DESTDIR=%{buildroot} export DESTDIR=%{buildroot}
@ -687,45 +695,44 @@ export DOT_SAGE=/tmp/sage$$
mkdir -p $DOT_SAGE/tmp mkdir -p $DOT_SAGE/tmp
# match system packages as sagemath packages # match system packages as sagemath packages
mkdir -p $SAGE_ROOT $SAGE_LOCAL #%{buildroot}%{SAGE_SRC} mkdir -p $SAGE_ROOT $SAGE_LOCAL
ln -sf %{_libdir} $SAGE_LOCAL/lib ln -sf %{_libdir} $SAGE_LOCAL/lib
ln -sf %{_includedir} $SAGE_LOCAL/include ln -sf %{_includedir} $SAGE_LOCAL/include
ln -sf %{_datadir} $SAGE_LOCAL/share ln -sf %{_datadir} $SAGE_LOCAL/share
#ln -sf $SAGE_SRC/sage %{buildroot}%{SAGE_SRC}/sage
export PATH=%{buildroot}%{_bindir}:$PATH export PATH=%{buildroot}%{_bindir}:$PATH
export PYTHONPATH=%{buildroot}%{python_sitearch}:$PYTHONPATH export PYTHONPATH=%{buildroot}%{python_sitearch}:$PYTHONPATH
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd spkg/build/sage-%{version} pushd src/c_lib
pushd c_lib # scons ignores most environment variables
# scons ignores most environment variables # and does not have soname support
# and does not have soname support sed -e 's|@@includedir@@|%{_includedir}|g' \
sed -e 's|@@includedir@@|%{_includedir}|g' \ -e 's|@@libdir@@|%{_libdir}|g' \
-e 's|@@libdir@@|%{_libdir}|g' \ -e 's|@@optflags@@|%{optflags}|g' \
-e 's|@@optflags@@|%{optflags}|g' \ -e 's|@@__global_ldflags@@|%{__global_ldflags}|g' \
-e 's|@@__global_ldflags@@|%{__global_ldflags}|g' \ -i SConstruct
-i SConstruct CXX=g++ UNAME=Linux SAGE64=auto scons
CXX=g++ UNAME=Linux SAGE64=auto scons ln -s libcsage.so.0 libcsage.so
ln -s libcsage.so.0 libcsage.so popd
popd pushd src/sage/libs/mpmath
pushd sage/libs/mpmath dos2unix ext_impl.pxd ext_libmp.pyx ext_main.pxd ext_main.pyx
dos2unix ext_impl.pxd ext_libmp.pyx ext_main.pxd ext_main.pyx popd
popd pushd src
python ./setup.py build python ./setup.py build
popd popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd spkg/build/%{sagenb_pkg}/src/sagenb pushd build/pkgs/sagenb/src/%{sagenb_pkg}
python ./setup.py build python ./setup.py build
popd popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd spkg/build/%{flintqs_pkg}/src pushd build/pkgs/flintqs/src
make %{?_smpflags} CPP="g++ %{optflags} -fPIC" make %{?_smpflags} CPP="g++ %{optflags} -fPIC"
popd popd
pushd spkg/build/%{rubiks_pkg}/src pushd build/pkgs/rubiks/src
make %{?_smp_mflags} CC="gcc -fPIC" CXX="g++ -fPIC" CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" make %{?_smp_mflags} CC="gcc -fPIC" CXX="g++ -fPIC" CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
popd popd
@ -734,11 +741,12 @@ rm -fr $DOT_SAGE
######################################################################## ########################################################################
%install %install
export CC=%{__cc}
export SAGE_ROOT=%{buildroot}%{SAGE_ROOT} export SAGE_ROOT=%{buildroot}%{SAGE_ROOT}
export SAGE_LOCAL=%{buildroot}%{SAGE_LOCAL} export SAGE_LOCAL=%{buildroot}%{SAGE_LOCAL}
export SAGE_SRC=%{buildroot}%{SAGE_SRC} export SAGE_SRC=%{buildroot}%{SAGE_SRC}
export SAGE_SHARE=%{buildroot}%{SAGE_SHARE} export SAGE_SHARE=%{buildroot}%{SAGE_SHARE}
export SAGE_EXTCODE=%{buildroot}%{SAGE_EXTCODE} export SAGE_ETC=%{buildroot}%{SAGE_ETC}
export SAGE_DOC=%{buildroot}%{SAGE_DOC} export SAGE_DOC=%{buildroot}%{SAGE_DOC}
export SAGE_PYTHONPATH=%{buildroot}%{SAGE_PYTHONPATH} export SAGE_PYTHONPATH=%{buildroot}%{SAGE_PYTHONPATH}
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH
@ -755,13 +763,13 @@ mkdir -p %{buildroot}%{_libdir}
mkdir -p $SAGE_PYTHONPATH mkdir -p $SAGE_PYTHONPATH
rm -fr $SAGE_LOCAL/{include,lib,share,notebook} rm -fr $SAGE_LOCAL/{include,lib,share,notebook}
mkdir -p $SAGE_SHARE $SAGE_DOC $SAGE_LOCAL/bin $SAGE_SRC mkdir -p $SAGE_SHARE $SAGE_DOC $SAGE_LOCAL/bin $SAGE_SRC
ln -sf $PWD/spkg/build/sage-%{version}/sage $SAGE_SRC/sage ln -sf $PWD/src/sage $SAGE_SRC/sage
ln -sf %{_libdir} $SAGE_LOCAL/lib ln -sf %{_libdir} $SAGE_LOCAL/lib
ln -sf %{_includedir} $SAGE_LOCAL/include ln -sf %{_includedir} $SAGE_LOCAL/include
ln -sf %{_datadir} $SAGE_LOCAL/share ln -sf %{_datadir} $SAGE_LOCAL/share
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd spkg/build/sage-%{version} pushd src
python setup.py install --root=%{buildroot} python setup.py install --root=%{buildroot}
cp -fa c_lib/libcsage.so.0 %{buildroot}%{_libdir} cp -fa c_lib/libcsage.so.0 %{buildroot}%{_libdir}
ln -sf libcsage.so.0 %{buildroot}%{_libdir}/libcsage.so ln -sf libcsage.so.0 %{buildroot}%{_libdir}/libcsage.so
@ -771,7 +779,7 @@ pushd spkg/build/sage-%{version}
popd popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd spkg/build/%{sagenb_pkg}/src/sagenb pushd build/pkgs/sagenb/src/%{sagenb_pkg}
rm -f %{buildroot}%{python_sitearch}/sagenb/data/sage3d/sage3d rm -f %{buildroot}%{python_sitearch}/sagenb/data/sage3d/sage3d
python setup.py install --root=%{buildroot} --install-purelib=%{python_sitearch} python setup.py install --root=%{buildroot} --install-purelib=%{python_sitearch}
install -p -m0755 %{SOURCE5} $SAGE_LOCAL/bin/testjava.sh install -p -m0755 %{SOURCE5} $SAGE_LOCAL/bin/testjava.sh
@ -792,15 +800,13 @@ pushd spkg/build/%{sagenb_pkg}/src/sagenb
popd popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%if %{with_sage_pexpect} pushd build/pkgs/pexpect/src
pushd spkg/build/%{pexpect_pkg}/src
cp -fa {ANSI,FSM,pexpect,pxssh,screen}.py $SAGE_PYTHONPATH cp -fa {ANSI,FSM,pexpect,pxssh,screen}.py $SAGE_PYTHONPATH
popd popd
%endif
#------------------------------------------------------------------------ #------------------------------------------------------------------------
cp -fa COPYING.txt $SAGE_ROOT cp -fa COPYING.txt $SAGE_ROOT
pushd spkg/build/sage_scripts-%{version} pushd src/bin
mkdir -p $SAGE_LOCAL/bin mkdir -p $SAGE_LOCAL/bin
cp -fa sage-* $SAGE_LOCAL/bin cp -fa sage-* $SAGE_LOCAL/bin
pushd $SAGE_LOCAL/bin pushd $SAGE_LOCAL/bin
@ -810,14 +816,14 @@ pushd spkg/build/sage_scripts-%{version}
ln -sf %{_bindir}/gmp-ecm ecm ln -sf %{_bindir}/gmp-ecm ecm
popd popd
popd popd
install -p -m755 spkg/bin/sage $SAGE_LOCAL/bin install -p -m755 src/bin/sage $SAGE_LOCAL/bin
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd spkg/build/%{flintqs_pkg}/src pushd build/pkgs/flintqs/src
cp -fa QuadraticSieve $SAGE_LOCAL/bin cp -fa QuadraticSieve $SAGE_LOCAL/bin
popd popd
pushd spkg/build/%{rubiks_pkg}/src pushd build/pkgs/rubiks/src
cp -fa \ cp -fa \
reid/optimal \ reid/optimal \
dietz/solver/cubex \ dietz/solver/cubex \
@ -831,19 +837,25 @@ popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd $SAGE_LOCAL/bin/ pushd $SAGE_LOCAL/bin/
for file in \ for file in \
sage-apply-ticket \ sage-arch-env \
sage-bdist \ sage-bdist \
sage-build \ sage-build \
sage-clone \ sage-clone \
sage-clone-source \
sage-combinat \ sage-combinat \
sage-crap \ sage-crap \
sage-dev \
sage-download-file \
sage-download-upstream \
sage-env \
sage-fix-pkg-checksums \
sage-list-experimental \ sage-list-experimental \
sage-list-optional \ sage-list-optional \
sage-list-packages \ sage-list-packages \
sage-list-standard \ sage-list-standard \
sage-location \ sage-location \
sage-make_devel_packages \
sage-omega \ sage-omega \
sage-open \
sage-pkg \ sage-pkg \
sage-pull \ sage-pull \
sage-push \ sage-push \
@ -853,14 +865,15 @@ pushd $SAGE_LOCAL/bin/
sage-rebaseall.sh \ sage-rebaseall.sh \
sage-rebase.bat \ sage-rebase.bat \
sage-rebase.sh \ sage-rebase.sh \
sage-rebase \
sage-rsyncdist \ sage-rsyncdist \
sage-sdist \ sage-sdist \
sage-spkg-install \ sage-spkg \
sage-startuptime.py \ sage-starts \
sage-sync-build.py \ sage-sync-build.py \
sage-test-import \ sage-test-import \
sage-update \ sage-update-src \
sage-update-build \ sage-update-version \
sage-upgrade \ sage-upgrade \
spkg-install; do spkg-install; do
rm -f $file rm -f $file
@ -868,60 +881,49 @@ pushd $SAGE_LOCAL/bin/
popd popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd spkg/build/%{conway_polynomials_pkg} pushd build/pkgs/conway_polynomials
%__python2 ./spkg-install %__python2 ./spkg-install
popd popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd spkg/build/%{elliptic_curves_pkg} pushd build/pkgs/elliptic_curves
%__python2 ./spkg-install %__python2 ./spkg-install
popd popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd spkg/build/extcode-%{version} pushd src/ext
mkdir -p $SAGE_EXTCODE mkdir -p $SAGE_ETC
for dir in \ for dir in \
gap \ gap \
genus2reduction \
gnuplot \
images \ images \
kash \
macaulay2 \
magma \ magma \
maple \
matlab \
mathematica \
maxima \ maxima \
MuPAD \
mwrank \ mwrank \
octave \
QEPCAD \
scilab \
singular \ singular \
sobj; do sobj; do
COUNT=`find $dir -type f | wc -l ` COUNT=`find $dir -type f | wc -l `
if [ $COUNT -gt 0 ]; then if [ $COUNT -gt 0 ]; then
cp -far $dir $SAGE_EXTCODE cp -far $dir $SAGE_ETC
fi fi
cp -far pari $SAGE_EXTCODE cp -far pari $SAGE_ETC
done done
cp -fa %{SOURCE1} $SAGE_EXTCODE/pari cp -fa %{SOURCE1} $SAGE_ETC
popd popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd spkg/build/%{graphs_pkg} pushd build/pkgs/graphs
mkdir -p $SAGE_SHARE/graphs mkdir -p $SAGE_SHARE/graphs
cp -fa src/* $SAGE_SHARE/graphs cp -fa src/* $SAGE_SHARE/graphs
popd popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd spkg/build/%{polytopes_db_pkg} pushd build/pkgs/polytopes_db
mkdir -p $SAGE_SHARE/reflexive_polytopes mkdir -p $SAGE_SHARE/reflexive_polytopes
cp -fa src/* $SAGE_SHARE/reflexive_polytopes cp -fa src/* $SAGE_SHARE/reflexive_polytopes
popd popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
pushd spkg/build/%{sagetex_pkg}/src pushd build/pkgs/sagetex/src
python setup.py install --root=%{buildroot} --install-purelib=%{python_sitearch} python setup.py install --root=%{buildroot} --install-purelib=%{python_sitearch}
install -p -m 0644 -D %{SOURCE2} \ install -p -m 0644 -D %{SOURCE2} \
%{buildroot}%{_datadir}/texmf/tex/generic/sagetex/makecmds.sty %{buildroot}%{_datadir}/texmf/tex/generic/sagetex/makecmds.sty
@ -945,7 +947,7 @@ export SAGE_TESTDIR=\$DOT_SAGE/tmp
export SAGE_ROOT="$SAGE_ROOT" export SAGE_ROOT="$SAGE_ROOT"
export SAGE_LOCAL="$SAGE_LOCAL" export SAGE_LOCAL="$SAGE_LOCAL"
export SAGE_SHARE="$SAGE_SHARE" export SAGE_SHARE="$SAGE_SHARE"
export SAGE_EXTCODE="$SAGE_EXTCODE" export SAGE_ETC="$SAGE_ETC"
export SAGE_SRC="$SAGE_SRC" export SAGE_SRC="$SAGE_SRC"
##export SAGE_DOC="$SAGE_DOC" ##export SAGE_DOC="$SAGE_DOC"
module load 4ti2-%{_arch} module load 4ti2-%{_arch}
@ -957,7 +959,11 @@ export PATH=$SAGE_LOCAL/bin:\$PATH
export SINGULARPATH=%{_libdir}/Singular/LIB export SINGULARPATH=%{_libdir}/Singular/LIB
export SINGULAR_BIN_DIR=%{_libdir}/Singular export SINGULAR_BIN_DIR=%{_libdir}/Singular
##export PYTHONPATH="$SAGE_PYTHONPATH:\$SAGE_LOCAL/bin" ##export PYTHONPATH="$SAGE_PYTHONPATH:\$SAGE_LOCAL/bin"
%if 0%{?fedora}
export SAGE_CBLAS=blas
%else
export SAGE_CBLAS=cblas export SAGE_CBLAS=cblas
%endif
export SAGE_FORTRAN=%{_bindir}/gfortran export SAGE_FORTRAN=%{_bindir}/gfortran
export SAGE_FORTRAN_LIB=\`gfortran --print-file-name=libgfortran.so\` export SAGE_FORTRAN_LIB=\`gfortran --print-file-name=libgfortran.so\`
export SYMPOW_DIR="\$DOT_SAGE/sympow" export SYMPOW_DIR="\$DOT_SAGE/sympow"
@ -980,14 +986,9 @@ chmod +x %{buildroot}%{SAGE_LOCAL}/bin/sage3d
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# adjust cython interface: # adjust cython interface:
# o link with proper atlas
# o install csage headers # o install csage headers
# o install .pxi and .pxd files # o install .pxi and .pxd files
pushd spkg/build/sage-%{version} pushd src
# make atlas/blas available to compiled sources
perl -pi -e \
's|^(extra_link_args =).*|$1 ["-L%{_libdir}/atlas"]|;' \
%{buildroot}%{python_sitearch}/sage/misc/cython.py
# make csage headers available # make csage headers available
mkdir -p %{buildroot}%{_includedir}/csage mkdir -p %{buildroot}%{_includedir}/csage
cp -fa c_lib/include/* %{buildroot}%{_includedir}/csage cp -fa c_lib/include/* %{buildroot}%{_includedir}/csage
@ -1000,12 +1001,10 @@ pushd spkg/build/sage-%{version}
popd popd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%if %{with_sage_pexpect}
cp -f $SAGE_PYTHONPATH/{ANSI,FSM,pexpect,pxssh,screen}.py %{buildroot}%{python_sitearch} cp -f $SAGE_PYTHONPATH/{ANSI,FSM,pexpect,pxssh,screen}.py %{buildroot}%{python_sitearch}
%endif
# Build documentation, using %#{buildroot} environment # Build documentation, using %#{buildroot} environment
pushd spkg/build/sage-%{version}/doc pushd src/doc
export SAGE_DOC=`pwd` export SAGE_DOC=`pwd`
export PATH=%{buildroot}%{_bindir}:$SAGE_LOCAL/bin:$PATH export PATH=%{buildroot}%{_bindir}:$SAGE_LOCAL/bin:$PATH
export SINGULARPATH=%{_libdir}/Singular/LIB export SINGULARPATH=%{_libdir}/Singular/LIB
@ -1027,7 +1026,6 @@ pushd spkg/build/sage-%{version}/doc
# should not be required and encodes buildroot # should not be required and encodes buildroot
rm -fr $SAGE_DOC/output/doctrees rm -fr $SAGE_DOC/output/doctrees
sed -e 's|%{buildroot}||g' -i $SAGE_DOC/output/html/en/reference/sage/misc/hg.html
popd popd
%if %{with_check} %if %{with_check}
@ -1039,9 +1037,7 @@ install -p -m644 $DOT_SAGE/tmp/test.log $SAGE_DOC/test.log
sed -i 's|%{buildroot}||g' $SAGE_DOC/test.log sed -i 's|%{buildroot}||g' $SAGE_DOC/test.log
%endif %endif
%if %{with_sage_pexpect}
rm -f %{buildroot}%{python_sitearch}/{ANSI,FSM,pexpect,pxssh,screen}.py{,c} rm -f %{buildroot}%{python_sitearch}/{ANSI,FSM,pexpect,pxssh,screen}.py{,c}
%endif
%if %{with_sphinx_hack} %if %{with_sphinx_hack}
rm -fr %{buildroot}%{python_sitearch}/sphinx rm -fr %{buildroot}%{python_sitearch}/sphinx
@ -1052,16 +1048,15 @@ perl -pi -e 's|%{buildroot}||g;s|^##||g;' %{buildroot}%{_bindir}/sage
# More wrong buildroot references # More wrong buildroot references
perl -pi -e 's|%{buildroot}||g;' \ perl -pi -e 's|%{buildroot}||g;' \
-e "s|$PWD/spkg/build/sage-%{version}/doc|%{SAGE_DOC}|g;" \ -e "s|$PWD/src/doc|%{SAGE_DOC}|g;" \
%{buildroot}%{SAGE_DOC}/output/html/en/reference/todolist.html \ %{buildroot}%{SAGE_DOC}/output/html/en/reference/todolist.html
%{buildroot}%{SAGE_DOC}/output/html/en/reference/misc/sage/misc/hg.html
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# Fix links # Fix links
rm -fr $SAGE_SRC/sage $SAGE_EXTCODE/sage $SAGE_ROOT/doc $SAGE_SRC/doc rm -fr $SAGE_SRC/sage $SAGE_ETC/sage $SAGE_ROOT/doc $SAGE_SRC/doc
rm -fr $SAGE_ROOT/share $SAGE_ROOT/devel rm -fr $SAGE_ROOT/share $SAGE_ROOT/devel
ln -sf %{python_sitearch}/sage $SAGE_SRC/sage ln -sf %{python_sitearch}/sage $SAGE_SRC/sage
ln -sf %{python_sitearch} $SAGE_EXTCODE/sage ln -sf %{python_sitearch} $SAGE_ETC/sage
ln -sf %{SAGE_DOC} $SAGE_ROOT/doc ln -sf %{SAGE_DOC} $SAGE_ROOT/doc
ln -sf %{SAGE_DOC} $SAGE_SRC/doc ln -sf %{SAGE_DOC} $SAGE_SRC/doc
ln -sf %{SAGE_SHARE} $SAGE_ROOT/share ln -sf %{SAGE_SHARE} $SAGE_ROOT/share
@ -1069,7 +1064,7 @@ ln -sf %{SAGE_SHARE} $SAGE_ROOT/share
ln -sf src $SAGE_ROOT/devel ln -sf src $SAGE_ROOT/devel
# Install menu and icons # Install menu and icons
pushd spkg/build/%{sagenb_pkg}/src/sagenb/sagenb/data pushd build/pkgs/sagenb/src/%{sagenb_pkg}/sagenb/data
install -p -m644 -D sage/images/icon32x32.png %{buildroot}%{_datadir}/pixmaps/%{name}.png install -p -m644 -D sage/images/icon32x32.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
popd popd
mkdir -p %{buildroot}%{_datadir}/applications mkdir -p %{buildroot}%{_datadir}/applications
@ -1176,10 +1171,8 @@ exit 0
%{SAGE_SRC}/doc %{SAGE_SRC}/doc
%{SAGE_SRC}/sage %{SAGE_SRC}/sage
%dir %{SAGE_PYTHONPATH} %dir %{SAGE_PYTHONPATH}
%if %{with_sage_pexpect}
# MIT # MIT
%{SAGE_PYTHONPATH}/*.py* %{SAGE_PYTHONPATH}/*.py*
%endif
# GPLv2+ # GPLv2+
%{_bindir}/sage %{_bindir}/sage
%{_datadir}/pixmaps/%{name}.png %{_datadir}/pixmaps/%{name}.png
@ -1195,8 +1188,9 @@ exit 0
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%files data %files data
%dir %{SAGE_SHARE} %dir %{SAGE_SHARE}
%dir %{SAGE_EXTCODE} %dir %{SAGE_ETC}
%{SAGE_EXTCODE}/sage %{SAGE_ETC}/sage
%{SAGE_ETC}/gprc.expect
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%files data-conway_polynomials %files data-conway_polynomials
@ -1210,15 +1204,15 @@ exit 0
%{SAGE_SHARE}/ellcurves %{SAGE_SHARE}/ellcurves
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%files data-extcode %files data-etc
# GPLv2+ # GPLv2+
%{SAGE_EXTCODE}/gap %{SAGE_ETC}/gap
%{SAGE_EXTCODE}/images %{SAGE_ETC}/images
%{SAGE_EXTCODE}/magma %{SAGE_ETC}/magma
%{SAGE_EXTCODE}/maxima %{SAGE_ETC}/maxima
%{SAGE_EXTCODE}/mwrank %{SAGE_ETC}/mwrank
%{SAGE_EXTCODE}/pari %{SAGE_ETC}/pari
%{SAGE_EXTCODE}/singular %{SAGE_ETC}/singular
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%files data-graphs %files data-graphs
@ -1366,6 +1360,9 @@ exit 0
######################################################################## ########################################################################
%changelog %changelog
* Fri Feb 7 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 6.1.1-1
- Update to sagemath 6.1.1
* Tue Jan 28 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.13-1 * Tue Jan 28 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.13-1
- Update to sagemath 5.13 - Update to sagemath 5.13

View file

@ -1 +1 @@
b549c5ac6b292a2837d92ccf3740c451 sage-5.13.tar 800c59f7cfa32c012f358ae240cdb2e6 sage-6.1.1.tar.gz