Lines 1-6
Link Here
|
1 |
--- numpy/distutils/system_info.py.orig 2019-08-27 21:01:36 UTC |
1 |
--- numpy/distutils/system_info.py.orig 2021-05-09 10:38:00 UTC |
2 |
+++ numpy/distutils/system_info.py |
2 |
+++ numpy/distutils/system_info.py |
3 |
@@ -172,6 +172,8 @@ def _c_string_literal(s): |
3 |
@@ -209,6 +209,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 |
@@ -1112,8 +1114,8 @@ class atlas_info(system_info): |
12 |
@@ -1322,8 +1324,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-64
Link Here
|
20 |
else: |
20 |
else: |
21 |
_lib_atlas = ['atlas'] |
21 |
_lib_atlas = ['atlas'] |
22 |
_lib_lapack = ['lapack'] |
22 |
_lib_lapack = ['lapack'] |
23 |
@@ -1633,11 +1635,6 @@ class blas_opt_info(system_info): |
|
|
24 |
self.set_info(**blis_info) |
25 |
return |
26 |
|
27 |
- openblas_info = get_info('openblas') |
28 |
- if openblas_info: |
29 |
- self.set_info(**openblas_info) |
30 |
- return |
31 |
- |
32 |
atlas_info = get_info('atlas_3_10_blas_threads') |
33 |
if not atlas_info: |
34 |
atlas_info = get_info('atlas_3_10_blas') |
35 |
@@ -1730,18 +1727,17 @@ 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 |
+ res = None |
52 |
+ for libname in ['cblas', 'blas', 'openblas']: |
53 |
+ try: |
54 |
+ c.link_executable(obj, os.path.join(tmpdir, "a.out"), |
55 |
+ libraries=[libname], |
56 |
+ library_dirs=info['library_dirs'], |
57 |
+ extra_postargs=info.get('extra_link_args', [])) |
58 |
+ res = libname |
59 |
+ break |
60 |
+ except distutils.ccompiler.LinkError: |
61 |
+ pass |
62 |
except distutils.ccompiler.CompileError: |
63 |
res = None |
64 |
finally: |