mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 03:39:03 -04:00
110 lines
4.8 KiB
Diff
110 lines
4.8 KiB
Diff
diff -up sage-5.10/spkg/build/conway_polynomials-0.4.p0/spkg-install.orig sage-5.10/spkg/build/conway_polynomials-0.4.p0/spkg-install
|
|
--- sage-5.10/spkg/build/conway_polynomials-0.4.p0/spkg-install.orig 2013-07-29 19:43:09.049027449 -0300
|
|
+++ sage-5.10/spkg/build/conway_polynomials-0.4.p0/spkg-install 2013-07-29 19:43:39.434028612 -0300
|
|
@@ -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.10/spkg/build/sage-5.10/module_list.py.orig sage-5.10/spkg/build/sage-5.10/module_list.py
|
|
--- sage-5.10/spkg/build/sage-5.10/module_list.py.orig 2013-07-29 19:43:09.023027448 -0300
|
|
+++ sage-5.10/spkg/build/sage-5.10/module_list.py 2013-07-29 19:44:52.051031393 -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', SAGE_INC + '/givaro/givconfig.h']
|
|
@@ -71,7 +72,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'
|
|
|
|
|
|
@@ -653,7 +654,7 @@ ext_modules = [
|
|
sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'],
|
|
libraries = ['m', 'ntl', 'mpfr', 'gmp', 'gmpxx',
|
|
'Lfunction', 'stdc++'],
|
|
- include_dirs = [SAGE_INC + "/libLfunction"],
|
|
+ include_dirs = [SAGE_INC + "/Lfunction"],
|
|
extra_compile_args=["-O3", "-ffast-math"],
|
|
language = 'c++'),
|
|
|
|
diff -up sage-5.10/spkg/build/sage-5.10/setup.py.orig sage-5.10/spkg/build/sage-5.10/setup.py
|
|
--- sage-5.10/spkg/build/sage-5.10/setup.py.orig 2013-07-29 19:43:09.041027448 -0300
|
|
+++ sage-5.10/spkg/build/sage-5.10/setup.py 2013-07-29 19:48:14.195039134 -0300
|
|
@@ -38,21 +38,11 @@ except KeyError:
|
|
|
|
SAGE_INC = os.path.join(SAGE_LOCAL,'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>
|
|
include_dirs = [SAGE_INC,
|
|
- os.path.join(SAGE_INC, 'csage'),
|
|
+ 'c_lib/include',
|
|
SAGE_SRC,
|
|
os.path.join(SAGE_SRC, 'sage', 'ext')]
|
|
|
|
@@ -77,7 +67,7 @@ if DEVEL:
|
|
# 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
|
|
# every module (regardless of the language btw.):
|
|
- m.libraries = ['csage'] + m.libraries + ['stdc++', 'ntl']
|
|
+ m.libraries = ['csage'] + m.libraries + ['stdc++', 'ntl', 'gmp', 'm', 'dl']
|
|
|
|
m.extra_compile_args += extra_compile_args
|
|
m.extra_link_args += extra_link_args
|
|
- m.library_dirs += ['%s/lib' % SAGE_LOCAL]
|
|
+ m.library_dirs += ['c_lib', '%s/lib' % SAGE_LOCAL]
|
|
|
|
|
|
|