aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2020-03-06 13:24:40 +0000
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2020-03-06 13:24:40 +0000
commitd975c661031edbf2fff37705ea86dae6b0db8c8e (patch)
tree5e7b9f51f0e5b2a9586219b05a64528049188b2c
parentDon't reinstall openblas (diff)
downloadpygensvm-d975c661031edbf2fff37705ea86dae6b0db8c8e.tar.gz
pygensvm-d975c661031edbf2fff37705ea86dae6b0db8c8e.zip
Manually add openblas include dir on MacOS travis
-rw-r--r--setup.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index aea27e6..0d963d2 100644
--- a/setup.py
+++ b/setup.py
@@ -70,6 +70,13 @@ def on_cibw_win():
)
+def on_cibw_mac():
+ return (
+ os.environ.get("CIBUILDWHEEL", "0") == "1"
+ and os.environ.get("TRAVIS_OS_NAME", "none") == "osx"
+ )
+
+
def _skl_get_blas_info():
"""Copyright notice for this function
@@ -161,6 +168,13 @@ def _skl_get_blas_info():
else:
cblas_libs = blas_info.pop("libraries", [])
+ if on_cibw_mac():
+ libdir = blas_info.get("library_dirs", [])
+ libdir = libdir[0] if libdir else None
+ if libdir:
+ base = os.path.join(os.path.split(libdir)[:-1])
+ blas_info["include_dirs"] = os.path.join(base, "include")
+
print("\n\n*** blas_info: \n%r\n\n ***\n\n" % blas_info)
print(
"\n\n*** os.environ.get('OPENBLAS') = %r ***\n\n"
@@ -295,6 +309,7 @@ def configuration():
print(config)
print("\n\n *** EXT_MODULE ***\n")
from pprint import pprint
+
print(pprint(config.ext_modules[0].__dict__))
return config