From 5f934419cd63bc8e8979032f588bc067dd008cd1 Mon Sep 17 00:00:00 2001 From: Steve Wills Date: Thu, 23 Jan 2020 21:31:23 +0000 Subject: [PATCH] math/py-numpy: fix build when math/blas is installed PR: 243497 Submitted by: rsmith@xs4all.nl --- .../files/patch-numpy-distutils-system_info.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/math/py-numpy/files/patch-numpy-distutils-system_info.py b/math/py-numpy/files/patch-numpy-distutils-system_info.py index 14d70b2bf714..a8dd1d7a9fcd 100644 --- a/math/py-numpy/files/patch-numpy-distutils-system_info.py +++ b/math/py-numpy/files/patch-numpy-distutils-system_info.py @@ -1,6 +1,6 @@ ---- numpy/distutils/system_info.py.orig 2019-01-31 02:31:08 UTC +--- numpy/distutils/system_info.py.orig 2019-08-27 19:01:36 UTC +++ numpy/distutils/system_info.py -@@ -169,6 +169,8 @@ def _c_string_literal(s): +@@ -172,6 +172,8 @@ def _c_string_literal(s): Convert a python string into a literal suitable for inclusion into C code """ # only these three characters are forbidden in C strings @@ -9,7 +9,7 @@ s = s.replace('\\', r'\\') s = s.replace('"', r'\"') s = s.replace('\n', r'\n') -@@ -1109,8 +1111,8 @@ class atlas_info(system_info): +@@ -1112,8 +1114,8 @@ class atlas_info(system_info): dir_env_var = 'ATLAS' _lib_names = ['f77blas', 'cblas'] if sys.platform[:7] == 'freebsd': @@ -20,7 +20,7 @@ else: _lib_atlas = ['atlas'] _lib_lapack = ['lapack'] -@@ -1630,11 +1632,6 @@ class blas_opt_info(system_info): +@@ -1633,11 +1635,6 @@ class blas_opt_info(system_info): self.set_info(**blis_info) return @@ -32,3 +32,12 @@ atlas_info = get_info('atlas_3_10_blas_threads') if not atlas_info: atlas_info = get_info('atlas_3_10_blas') +@@ -1742,7 +1739,7 @@ class blas_info(system_info): + library_dirs=info['library_dirs'], + extra_postargs=info.get('extra_link_args', [])) + res = "blas" +- except distutils.ccompiler.CompileError: ++ except (distutils.ccompiler.CompileError, distutils.ccompiler.LinkError): + res = None + finally: + shutil.rmtree(tmpdir)