diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/science/math/sage/patches/python-5755-hotpatch.patch')
-rw-r--r-- | nixpkgs/pkgs/applications/science/math/sage/patches/python-5755-hotpatch.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/python-5755-hotpatch.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/python-5755-hotpatch.patch new file mode 100644 index 000000000000..1b64f39fe60f --- /dev/null +++ b/nixpkgs/pkgs/applications/science/math/sage/patches/python-5755-hotpatch.patch @@ -0,0 +1,28 @@ +diff --git a/src/sage/all.py b/src/sage/all.py +index ca309ef..be3186b 100644 +--- a/src/sage/all.py ++++ b/src/sage/all.py +@@ -298,6 +298,23 @@ warnings.filterwarnings('ignore', module='matplotlib[.]font_manager') + warnings.filterwarnings('default', + '[\s\S]*See http://trac.sagemath.org/[0-9]* for details.') + ++# Hotpatch around https://bugs.python.org/issue5755 which won't be fixed for ++# python 2.7. Idea by https://stackoverflow.com/a/36293331. ++from distutils.command.build_ext import build_ext ++from distutils.sysconfig import customize_compiler ++ ++_build_extensions = build_ext.build_extensions ++ ++def build_extensions_patched(self): ++ customize_compiler(self.compiler) ++ try: ++ self.compiler.compiler_so.remove("-Wstrict-prototypes") ++ except (AttributeError, ValueError): ++ pass ++ _build_extensions(self) ++ ++build_ext.build_extensions = build_extensions_patched ++ + + # Set a new random number seed as the very last thing + # (so that printing initial_seed() and using that seed |