mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 03:39:03 -04:00
96 lines
3.6 KiB
Diff
96 lines
3.6 KiB
Diff
diff -up src/module_list.py.orig src/module_list.py
|
|
--- src/module_list.py.orig 2014-08-13 11:34:14.739202143 -0300
|
|
+++ src/module_list.py 2014-08-13 11:34:18.828202300 -0300
|
|
@@ -5,7 +5,7 @@ from distutils.core import setup
|
|
from distutils.extension import Extension
|
|
from sage.env import *
|
|
|
|
-SAGE_INC = os.path.join(SAGE_LOCAL, 'include')
|
|
+SAGE_INC = '/usr/include'
|
|
|
|
#########################################################
|
|
### BLAS setup
|
|
@@ -36,10 +36,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']
|
|
@@ -70,7 +71,7 @@ givaro_extra_compile_args =['-D__STDC_LI
|
|
### PolyBoRi settings
|
|
#########################################################
|
|
|
|
-polybori_extra_compile_args = []
|
|
+polybori_extra_compile_args = ['-DPBORI_USE_ORIGINAL_CUDD']
|
|
polybori_major_version = '0.8'
|
|
|
|
|
|
@@ -710,7 +711,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 2014-08-13 11:34:14.742202143 -0300
|
|
+++ src/setup.py 2014-08-13 11:34:55.082203688 -0300
|
|
@@ -36,11 +36,11 @@ except KeyError:
|
|
compile_result_dir = None
|
|
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')]
|
|
|
|
@@ -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']
|
|
|
|
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]
|
|
|
|
|
|
#############################################
|
|
@@ -556,20 +558,6 @@ print "Discovered Python source, time: %
|
|
|
|
|
|
#########################################################
|
|
-### Clean
|
|
-#########################################################
|
|
-
|
|
-print('Cleaning up stale installed files....')
|
|
-t = time.time()
|
|
-from sage_setup.clean import clean_install_dir
|
|
-output_dirs = SITE_PACKAGES + glob.glob(os.path.join(SAGE_SRC, 'build', 'lib*'))
|
|
-for output_dir in output_dirs:
|
|
- print('- cleaning {0}'.format(output_dir))
|
|
- clean_install_dir(output_dir, python_packages, python_modules, ext_modules)
|
|
-print('Finished cleaning, time: %.2f seconds.' % (time.time() - t))
|
|
-
|
|
-
|
|
-#########################################################
|
|
### Distutils
|
|
#########################################################
|
|
|