@@ -15,6 +15,10 @@ waflib.Logs.verbose = 1
15
15
# context.
16
16
import numpy.build_utils.waf
17
17
18
+ from numpy.build_utils.apple_accelerate \
19
+ import \
20
+ get_sgemv_fix
21
+
18
22
from code_generators.numpy_api \
19
23
import \
20
24
multiarray_api, ufunc_api
@@ -27,6 +31,9 @@ from setup_common \
27
31
C99_FUNCS_SINGLE, C99_COMPLEX_TYPES, C99_COMPLEX_FUNCS, \
28
32
MANDATORY_FUNCS, C_ABI_VERSION, C_API_VERSION
29
33
34
+ def make_relpath(f):
35
+ return os.path.relpath(f, os.path.abspath(os.path.dirname(__file__)))
36
+
30
37
ENABLE_SEPARATE_COMPILATION = (os.environ.get('NPY_SEPARATE_COMPILATION', "1") != "0")
31
38
NPY_RELAXED_STRIDES_CHECKING = (os.environ.get('NPY_RELAXED_STRIDES_CHECKING', "1") != "0")
32
39
@@ -483,6 +490,8 @@ def pre_build(context):
483
490
sources.extend([pjoin('src', 'multiarray', 'cblasfuncs.c'),
484
491
pjoin('src', 'multiarray', 'python_xerbla.c'),
485
492
])
493
+ if "Accelerate" in bld.env.FRAMEWORK_CBLAS:
494
+ sources.extend([make_relpath(get_sgemv_fix()[0])])
486
495
else:
487
496
sources = extension.sources
488
497
0 commit comments