math/py-numpy: fix build when math/blas is installed

PR:		243497
Submitted by:	rsmith@xs4all.nl
This commit is contained in:
Steve Wills 2020-01-23 21:31:23 +00:00
parent cb93129d42
commit 5f934419cd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=523944

View File

@ -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)