Update to sagemath 6.8

This commit is contained in:
pcpa 2015-12-22 12:50:40 -02:00
parent b4699213da
commit 3aa9b0c734
32 changed files with 806 additions and 615 deletions

View file

@ -1,7 +1,7 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2015-04-03 14:55:44.607374909 -0300
+++ src/module_list.py 2015-04-03 14:56:03.416375630 -0300
@@ -4,7 +4,7 @@ import os
--- src/module_list.py.orig 2015-12-09 18:09:26.357141568 -0200
+++ src/module_list.py 2015-12-09 18:09:36.501141956 -0200
@@ -3,7 +3,7 @@ from glob import glob
from distutils.extension import Extension
from sage.env import SAGE_LOCAL
@ -10,21 +10,7 @@ diff -up src/module_list.py.orig src/module_list.py
#########################################################
### BLAS setup
@@ -35,10 +35,11 @@ else:
### Commonly used definitions
#########################################################
-numpy_include_dirs = [SAGE_LOCAL + '/lib/python/site-packages/numpy/core/include']
+from distutils.sysconfig import get_python_lib
+numpy_include_dirs = [get_python_lib(1) + '/numpy/core/include']
# We pick a file from numpy which is autogenerated so it has the
# timestamp of the numpy build.
-numpy_depends = [SAGE_LOCAL + '/lib/python/site-packages/numpy/core/include/numpy/_numpyconfig.h']
+numpy_depends = [get_python_lib(1) + '/numpy/core/include/numpy/_numpyconfig.h']
flint_depends = [SAGE_INC + '/flint/flint.h']
singular_depends = [SAGE_INC + '/libsingular.h']
@@ -71,7 +72,7 @@ givaro_extra_compile_args =['-D__STDC_LI
@@ -66,7 +66,7 @@ givaro_extra_compile_args =['-D__STDC_LI
### PolyBoRi settings
#########################################################
@ -32,48 +18,33 @@ diff -up src/module_list.py.orig src/module_list.py
+polybori_extra_compile_args = ['-DPBORI_USE_ORIGINAL_CUDD']
polybori_major_version = '0.8'
@@ -746,7 +747,7 @@ ext_modules = [
sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'],
libraries = ['m', 'ntl', 'mpfr', 'gmp', 'gmpxx',
'Lfunction'],
- include_dirs = [SAGE_INC + "/libLfunction"],
+ include_dirs = [SAGE_INC + "/Lfunction"],
extra_compile_args=["-O3", "-ffast-math"],
language = 'c++'),
#########################################################
diff -up src/setup.py.orig src/setup.py
--- src/setup.py.orig 2015-04-03 14:56:00.033375500 -0300
+++ src/setup.py 2015-04-03 14:56:03.416375630 -0300
@@ -36,11 +36,11 @@ except KeyError:
compile_result_dir = None
--- src/setup.py.orig 2015-12-09 18:09:33.813141853 -0200
+++ src/setup.py 2015-12-09 18:13:21.819150584 -0200
@@ -64,6 +64,7 @@ except KeyError:
keep_going = False
-SAGE_INC = os.path.join(SAGE_LOCAL, 'include')
+SAGE_INC = '/usr/include'
# search for dependencies and add to gcc -I<path>
include_dirs = [SAGE_INC,
- os.path.join(SAGE_INC, 'csage'),
+ 'c_lib/include',
SAGE_SRC,
os.path.join(SAGE_SRC, 'sage', 'ext')]
+SAGE_INC = '/usr/include'
include_dirs = sage_include_directories(use_sources=True)
@@ -171,10 +171,12 @@ for m in ext_modules:
m.libraries = ['csage'] + m.libraries
if m.language == 'c++':
m.libraries.append('stdc++')
+ m.libraries.append('ntl')
+ m.libraries = m.libraries + ['gmp', 'm', 'dl']
# Manually add -fno-strict-aliasing, which is needed to compile Cython
@@ -567,11 +568,9 @@ def run_cythonize():
print('Enabling Cython profiling support')
profile = True
m.extra_compile_args = m.extra_compile_args + extra_compile_args
m.extra_link_args = m.extra_link_args + extra_link_args
- m.library_dirs = m.library_dirs + [os.path.join(SAGE_LOCAL, "lib")]
+ m.library_dirs += ['c_lib', '%s/lib' % SAGE_LOCAL]
m.include_dirs = m.include_dirs + include_dirs
- # Disable Cython caching (the cache is stored in ~/.cycache which is
+ # Enable Cython caching (the cache is stored in ~/.cycache which is
# Cython's default).
- # Cycache is currently too broken to use reliably:
- # http://trac.sagemath.org/ticket/17851
- Cython.Compiler.Main.default_options['cache'] = False
+ Cython.Compiler.Main.default_options['cache'] = True
@@ -579,20 +581,6 @@ print "Discovered Python source, time: %
force = True
version_file = os.path.join(os.path.dirname(__file__), '.cython_version')
@@ -620,21 +619,6 @@ print("Discovered Python/Cython sources,
#########################################################
@ -86,7 +57,8 @@ diff -up src/setup.py.orig src/setup.py
-output_dirs = SITE_PACKAGES + glob.glob(os.path.join(SAGE_SRC, 'build', 'lib*'))
-for output_dir in output_dirs:
- print('- cleaning {0}'.format(output_dir))
- clean_install_dir(output_dir, python_packages, python_modules, ext_modules)
- clean_install_dir(output_dir, python_packages, python_modules,
- ext_modules, python_data_files)
-print('Finished cleaning, time: %.2f seconds.' % (time.time() - t))
-
-