Correct sagemath FTBFS in f25+

This commit is contained in:
pcpa 2016-12-21 09:17:04 -05:00
parent 98d729b877
commit 09aad4ce54
2 changed files with 50 additions and 0 deletions

46
sagemath-ftbfs.patch Normal file
View file

@ -0,0 +1,46 @@
diff -up src/module_list.py.orig src/module_list.py
--- src/module_list.py.orig 2016-12-20 18:33:57.413138357 -0200
+++ src/module_list.py 2016-12-20 18:34:00.857036531 -0200
@@ -24,7 +24,7 @@ lapack_include_dirs = [ SAGE_INC + '/lap
# GNU Scientific Library
# Note we replace the built-in gslcblas with the above cblas
gsl_pc = pkgconfig.parse('gsl')
-gsl_libs = list(gsl_pc['libraries'].difference(['gslcblas']).union(cblas_libs))
+gsl_libs = list(set(gsl_pc['libraries']).difference(['gslcblas']).union(cblas_libs))
gsl_library_dirs = list(cblas_pc['library_dirs'])
gsl_include_dirs = list(gsl_pc['include_dirs'])
diff -up src/sage/structure/element_wrapper.pyx.orig src/sage/structure/element_wrapper.pyx
--- src/sage/structure/element_wrapper.pyx.orig 2016-12-20 18:33:57.416138269 -0200
+++ src/sage/structure/element_wrapper.pyx 2016-12-20 18:34:20.210464296 -0200
@@ -111,10 +111,10 @@ cdef class ElementWrapper(Element):
Element.__init__(self, parent=parent)
self.value = value
- # When self is an extension type without a __dict__ attribute,
- # this prevents self.__dict__ to return whatever crap obtained by
- # lookup through the categories ...
- __dict__ = {}
+ # When self is an extension type without a __dict__ attribute,
+ # this prevents self.__dict__ to return whatever crap obtained by
+ # lookup through the categories ...
+ __dict__ = {}
def __getstate__(self):
"""
diff -up src/setup.py.orig src/setup.py
--- src/setup.py.orig 2016-12-20 18:33:57.414138328 -0200
+++ src/setup.py 2016-12-20 18:34:00.858036501 -0200
@@ -542,9 +542,9 @@ def run_cythonize():
# Sage uses these directives (mostly for historical reasons).
Cython.Compiler.Options.embed_pos_in_docstring = True
- Cython.Compiler.Options.directive_defaults['autotestdict'] = False
- Cython.Compiler.Options.directive_defaults['cdivision'] = True
- Cython.Compiler.Options.directive_defaults['fast_getattr'] = True
+ Cython.Compiler.Options._directive_defaults['autotestdict'] = False
+ Cython.Compiler.Options._directive_defaults['cdivision'] = True
+ Cython.Compiler.Options._directive_defaults['fast_getattr'] = True
# The globals() builtin in Cython was fixed to return to the current scope,
# but Sage relies on the broken behavior of returning to the nearest
# enclosing Python scope (e.g. to perform variable injection).

View file

@ -185,6 +185,9 @@ Patch31: %{name}-is_in_terminal.patch
# Update for python-flask-0.11.1 # Update for python-flask-0.11.1
Patch32: %{name}-flask.patch Patch32: %{name}-flask.patch
# Corrections to build in latest f25 and rawhide
Patch33: %{name}-ftbfs.patch
BuildRequires: 4ti2 BuildRequires: 4ti2
BuildRequires: arb-devel BuildRequires: arb-devel
BuildRequires: atlas-devel BuildRequires: atlas-devel
@ -700,6 +703,7 @@ popd
%patch30 %patch30
%patch31 %patch31
%patch32 %patch32
%patch33
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}|' \