summaryrefslogtreecommitdiff
path: root/math/py-numpy
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2020-01-31 14:08:51 +0000
committerSteve Wills <swills@FreeBSD.org>2020-01-31 14:08:51 +0000
commitf40f1cfd9fce5fe8c713806a83f7c0c0b707816a (patch)
treee21110cc195b0a6d7a990275507675ffccf3fc5d /math/py-numpy
parentRemove more expired ports: (diff)
math/py-numpy: improve patch to fix build with OpenBlas
This patch adds openblas to the list of cblas compatible libs instead PR: 243497 Submitted by: John Hein <jcfyecrayz@liamekaens.com>
Notes
Notes: svn path=/head/; revision=524711
Diffstat (limited to 'math/py-numpy')
-rw-r--r--math/py-numpy/files/patch-numpy-distutils-system_info.py37
1 files changed, 29 insertions, 8 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 a8dd1d7a9fcd..299f98311648 100644
--- a/math/py-numpy/files/patch-numpy-distutils-system_info.py
+++ b/math/py-numpy/files/patch-numpy-distutils-system_info.py
@@ -1,4 +1,4 @@
---- numpy/distutils/system_info.py.orig 2019-08-27 19:01:36 UTC
+--- numpy/distutils/system_info.py.orig 2019-08-27 21:01:36 UTC
+++ numpy/distutils/system_info.py
@@ -172,6 +172,8 @@ def _c_string_literal(s):
Convert a python string into a literal suitable for inclusion into C code
@@ -32,12 +32,33 @@
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):
+@@ -1730,18 +1727,17 @@ class blas_info(system_info):
+ # check we can link (find library)
+ # some systems have separate cblas and blas libs. First
+ # check for cblas lib, and if not present check for blas lib.
+- try:
+- c.link_executable(obj, os.path.join(tmpdir, "a.out"),
+- libraries=["cblas"],
+- library_dirs=info['library_dirs'],
+- extra_postargs=info.get('extra_link_args', []))
+- res = "cblas"
+- except distutils.ccompiler.LinkError:
+- c.link_executable(obj, os.path.join(tmpdir, "a.out"),
+- libraries=["blas"],
+- library_dirs=info['library_dirs'],
+- extra_postargs=info.get('extra_link_args', []))
+- res = "blas"
++ res = None
++ for libname in ['cblas', 'blas', 'openblas']:
++ try:
++ c.link_executable(obj, os.path.join(tmpdir, "a.out"),
++ libraries=[libname],
++ library_dirs=info['library_dirs'],
++ extra_postargs=info.get('extra_link_args', []))
++ res = libname
++ break
++ except distutils.ccompiler.LinkError:
++ pass
+ except distutils.ccompiler.CompileError:
res = None
finally:
- shutil.rmtree(tmpdir)