From 09aad4ce54dd06f3bfd10d1d0299adbc29d6453b Mon Sep 17 00:00:00 2001 From: pcpa Date: Dec 21 2016 14:17:04 +0000 Subject: Correct sagemath FTBFS in f25+ --- diff --git a/sagemath-ftbfs.patch b/sagemath-ftbfs.patch new file mode 100644 index 0000000..4a1a4e7 --- /dev/null +++ b/sagemath-ftbfs.patch @@ -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). diff --git a/sagemath.spec b/sagemath.spec index 6c185d4..65f31c7 100644 --- a/sagemath.spec +++ b/sagemath.spec @@ -185,6 +185,9 @@ Patch31: %{name}-is_in_terminal.patch # Update for python-flask-0.11.1 Patch32: %{name}-flask.patch +# Corrections to build in latest f25 and rawhide +Patch33: %{name}-ftbfs.patch + BuildRequires: 4ti2 BuildRequires: arb-devel BuildRequires: atlas-devel @@ -700,6 +703,7 @@ popd %patch30 %patch31 %patch32 +%patch33 sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \ -e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \