forked from matthew-brett/manylinux-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openblas_1.7.0.patch
72 lines (66 loc) · 2.32 KB
/
openblas_1.7.0.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index bac90fb..6d822be 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -12,6 +12,7 @@ classes are available:
lapack_atlas_info
blas_info
lapack_info
+ openblas_info
blas_opt_info # usage recommended
lapack_opt_info # usage recommended
fftw_info,dfftw_info,sfftw_info
@@ -289,6 +290,7 @@ def get_info(name, notfound_action=0):
'lapack_atlas': lapack_atlas_info, # use lapack_opt instead
'lapack_atlas_threads': lapack_atlas_threads_info, # ditto
'mkl': mkl_info,
+ 'openblas': openblas_info, # use blas_opt instead
'lapack_mkl': lapack_mkl_info, # use lapack_opt instead
'blas_mkl': blas_mkl_info, # use blas_opt instead
'x11': x11_info,
@@ -1357,6 +1359,11 @@ class lapack_opt_info(system_info):
def calc_info(self):
+ openblas_info = get_info('openblas')
+ if openblas_info:
+ self.set_info(**openblas_info)
+ return
+
if sys.platform == 'darwin' and not os.environ.get('ATLAS', None):
args = []
link_args = []
@@ -1446,6 +1453,11 @@ class blas_opt_info(system_info):
def calc_info(self):
+ openblas_info = get_info('openblas')
+ if openblas_info:
+ self.set_info(**openblas_info)
+ return
+
if sys.platform == 'darwin' and not os.environ.get('ATLAS', None):
args = []
link_args = []
@@ -1528,6 +1540,27 @@ class blas_info(system_info):
self.set_info(**info)
+class openblas_info(blas_info):
+ section = 'openblas'
+ dir_env_var = 'OPENBLAS'
+ _lib_names = ['openblas']
+ notfounderror = BlasNotFoundError
+
+ def calc_info(self):
+ lib_dirs = self.get_lib_dirs()
+
+ openblas_libs = self.get_libs('openblas_libs', self._lib_names)
+ for d in lib_dirs:
+ blas = self.check_libs(d,openblas_libs,[])
+ if blas is not None:
+ info = blas
+ break
+ else:
+ return
+ info['language'] = 'f77' # XXX: is it generally true?
+ self.set_info(**info)
+
+
class blas_src_info(system_info):
section = 'blas_src'
dir_env_var = 'BLAS_SRC'