Lines 1-6
Link Here
|
1 |
--- numpy/distutils/system_info.py.orig 2019-01-31 02:31:08 UTC |
1 |
--- numpy/distutils/system_info.py.orig 2019-08-27 21:01:36 UTC |
2 |
+++ numpy/distutils/system_info.py |
2 |
+++ numpy/distutils/system_info.py |
3 |
@@ -169,6 +169,8 @@ def _c_string_literal(s): |
3 |
@@ -172,6 +172,8 @@ def _c_string_literal(s): |
4 |
Convert a python string into a literal suitable for inclusion into C code |
4 |
Convert a python string into a literal suitable for inclusion into C code |
5 |
""" |
5 |
""" |
6 |
# only these three characters are forbidden in C strings |
6 |
# only these three characters are forbidden in C strings |
Lines 9-15
Link Here
|
9 |
s = s.replace('\\', r'\\') |
9 |
s = s.replace('\\', r'\\') |
10 |
s = s.replace('"', r'\"') |
10 |
s = s.replace('"', r'\"') |
11 |
s = s.replace('\n', r'\n') |
11 |
s = s.replace('\n', r'\n') |
12 |
@@ -1109,8 +1111,8 @@ class atlas_info(system_info): |
12 |
@@ -1112,8 +1114,8 @@ class atlas_info(system_info): |
13 |
dir_env_var = 'ATLAS' |
13 |
dir_env_var = 'ATLAS' |
14 |
_lib_names = ['f77blas', 'cblas'] |
14 |
_lib_names = ['f77blas', 'cblas'] |
15 |
if sys.platform[:7] == 'freebsd': |
15 |
if sys.platform[:7] == 'freebsd': |
Lines 20-26
Link Here
|
20 |
else: |
20 |
else: |
21 |
_lib_atlas = ['atlas'] |
21 |
_lib_atlas = ['atlas'] |
22 |
_lib_lapack = ['lapack'] |
22 |
_lib_lapack = ['lapack'] |
23 |
@@ -1630,11 +1632,6 @@ class blas_opt_info(system_info): |
23 |
@@ -1633,11 +1635,6 @@ class blas_opt_info(system_info): |
24 |
self.set_info(**blis_info) |
24 |
self.set_info(**blis_info) |
25 |
return |
25 |
return |
26 |
|
26 |
|
Lines 32-34
Link Here
|
32 |
atlas_info = get_info('atlas_3_10_blas_threads') |
32 |
atlas_info = get_info('atlas_3_10_blas_threads') |
33 |
if not atlas_info: |
33 |
if not atlas_info: |
34 |
atlas_info = get_info('atlas_3_10_blas') |
34 |
atlas_info = get_info('atlas_3_10_blas') |
|
|
35 |
@@ -1730,19 +1727,18 @@ class blas_info(system_info): |
36 |
# check we can link (find library) |
37 |
# some systems have separate cblas and blas libs. First |
38 |
# check for cblas lib, and if not present check for blas lib. |
39 |
- try: |
40 |
- c.link_executable(obj, os.path.join(tmpdir, "a.out"), |
41 |
- libraries=["cblas"], |
42 |
- library_dirs=info['library_dirs'], |
43 |
- extra_postargs=info.get('extra_link_args', [])) |
44 |
- res = "cblas" |
45 |
- except distutils.ccompiler.LinkError: |
46 |
- c.link_executable(obj, os.path.join(tmpdir, "a.out"), |
47 |
- libraries=["blas"], |
48 |
- library_dirs=info['library_dirs'], |
49 |
- extra_postargs=info.get('extra_link_args', [])) |
50 |
- res = "blas" |
51 |
- except distutils.ccompiler.CompileError: |
52 |
+ res = None |
53 |
+ for libname in ['cblas', 'blas', 'openblas']: |
54 |
+ try: |
55 |
+ c.link_executable(obj, os.path.join(tmpdir, "a.out"), |
56 |
+ libraries=[libname], |
57 |
+ library_dirs=info['library_dirs'], |
58 |
+ extra_postargs=info.get('extra_link_args', [])) |
59 |
+ res = libname |
60 |
+ break |
61 |
+ except distutils.ccompiler.LinkError: |
62 |
+ pass |
63 |
+ except (distutils.ccompiler.CompileError, distutils.ccompiler.LinkError): |
64 |
res = None |
65 |
finally: |
66 |
shutil.rmtree(tmpdir) |