mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 03:39:03 -04:00
Also: - Bundle ipython again; Fedora version is too far ahead. Also have to bundle prompt_toolkit since Fedora version is too far ahead of bundled ipython. - Drop LANGUAGES variable setting, now ignored by the sagemath build system. - Drop unused SAGE_CBLAS variable from /usr/bin/sage. - Do not force the C locale when launching sagemath. - Allow the user to override SAGE_DEBUG in /usr/bin/sage. - Add -ecm, -giac, and -latte patches to fix interactions with external tools. - Add -sigfpe patch from upstream.
90 lines
3.9 KiB
Diff
90 lines
3.9 KiB
Diff
diff -up src/module_list.py.orig src/module_list.py
|
|
--- src/module_list.py.orig 2019-01-16 09:42:29.021226961 -0700
|
|
+++ src/module_list.py 2019-01-16 09:42:41.397004883 -0700
|
|
@@ -2,7 +2,7 @@ import os
|
|
from distutils.extension import Extension
|
|
from sage.env import SAGE_LOCAL
|
|
|
|
-SAGE_INC = os.path.join(SAGE_LOCAL, 'include')
|
|
+SAGE_INC = '/usr/include'
|
|
|
|
#########################################################
|
|
### pkg-config setup
|
|
diff -up src/sage/misc/cython.py.orig src/sage/misc/cython.py
|
|
--- src/sage/misc/cython.py.orig 2018-12-22 16:37:09.000000000 -0700
|
|
+++ src/sage/misc/cython.py 2019-01-04 10:27:47.031123276 -0700
|
|
@@ -600,7 +600,7 @@ def cython(filename, verbose=0, compile_
|
|
ext = Extension(name,
|
|
sources=[pyxfile] + extra_sources,
|
|
libraries=libs,
|
|
- library_dirs=[os.path.join(SAGE_LOCAL, "lib")] + libdirs,
|
|
+ library_dirs=[os.path.realpath(os.path.join(SAGE_LOCAL, "lib"))] + libdirs,
|
|
extra_compile_args=extra_args,
|
|
language=language)
|
|
|
|
diff -up src/setup.py.orig src/setup.py
|
|
--- src/setup.py.orig 2018-12-22 16:37:10.000000000 -0700
|
|
+++ src/setup.py 2019-01-04 10:27:47.032123257 -0700
|
|
@@ -371,9 +371,8 @@ class sage_build_cython(Command):
|
|
# Debugging
|
|
gdb_debug=self.debug,
|
|
output_dir=os.path.join(self.build_lib, "sage"),
|
|
- # Disable Cython caching, which is currently too broken to
|
|
- # use reliably: http://trac.sagemath.org/ticket/17851
|
|
- cache=False,
|
|
+ # Enable Cython caching (the cache is stored in ~/.cycache)
|
|
+ cache=True,
|
|
)
|
|
|
|
# Filter out extensions with skip_build=True
|
|
@@ -882,9 +881,6 @@ class sage_install(install):
|
|
install.run(self)
|
|
self.install_kernel_spec()
|
|
log.info('Cleaning up stale installed files....')
|
|
- t = time.time()
|
|
- self.clean_stale_files()
|
|
- log.info('Finished cleaning, time: %.2f seconds.' % (time.time() - t))
|
|
|
|
def install_kernel_spec(self):
|
|
"""
|
|
@@ -901,40 +897,6 @@ class sage_install(install):
|
|
# the install_data directory for installing our Jupyter files.
|
|
SageKernelSpec.update(prefix=self.install_data)
|
|
|
|
- def clean_stale_files(self):
|
|
- """
|
|
- Remove stale installed files.
|
|
-
|
|
- This removes files which are built/installed but which do not
|
|
- exist in the Sage sources (typically because some source file
|
|
- has been deleted). Files are removed from the build directory
|
|
- ``build/lib-*`` and from the install directory ``site-packages``.
|
|
- """
|
|
- dist = self.distribution
|
|
- cmd_build_py = self.get_finalized_command("build_py")
|
|
- cmd_build_cython = self.get_finalized_command("build_cython")
|
|
-
|
|
- # Determine all Python modules inside all packages
|
|
- py_modules = []
|
|
- for package in dist.packages:
|
|
- package_dir = cmd_build_py.get_package_dir(package)
|
|
- py_modules += cmd_build_py.find_package_modules(package, package_dir)
|
|
- # modules is a list of triples (package, module, module_file).
|
|
- # Construct the complete module name from this.
|
|
- py_modules = ["{0}.{1}".format(*m) for m in py_modules]
|
|
-
|
|
- # Clean install directory (usually, purelib and platlib are the same)
|
|
- # and build directory.
|
|
- output_dirs = [self.install_purelib, self.install_platlib, self.build_lib]
|
|
- from sage_setup.clean import clean_install_dir
|
|
- for output_dir in set(output_dirs):
|
|
- log.info('- cleaning {0}'.format(output_dir))
|
|
- clean_install_dir(output_dir,
|
|
- dist.packages,
|
|
- py_modules,
|
|
- dist.ext_modules,
|
|
- cmd_build_cython.get_cythonized_package_files())
|
|
-
|
|
|
|
#########################################################
|
|
### Distutils
|