提交 bad57596 authored 作者: Frederic's avatar Frederic

Try to fix blas epd on mac

上级 3a4e6c78
...@@ -319,6 +319,7 @@ def default_blas_ldflags(): ...@@ -319,6 +319,7 @@ def default_blas_ldflags():
try: try:
# If we are in a EPD installation, mkl is available # If we are in a EPD installation, mkl is available
blas_info = numpy.distutils.__config__.blas_opt_info blas_info = numpy.distutils.__config__.blas_opt_info
extra = []
if "EPD" in sys.version: if "EPD" in sys.version:
if sys.platform == 'win32': if sys.platform == 'win32':
return ' '.join( return ' '.join(
...@@ -328,6 +329,14 @@ def default_blas_ldflags(): ...@@ -328,6 +329,14 @@ def default_blas_ldflags():
# blas_info['libraries']? # blas_info['libraries']?
['-l%s' % l for l in ["mk2_core", "mk2_intel_thread", ['-l%s' % l for l in ["mk2_core", "mk2_intel_thread",
"mk2_rt"]]) "mk2_rt"]])
elif sys.platform == 'darwin':
# This is needed to link with
new_path = os.path.join(sys.prefix, "lib")
if False:
assert os.getenv("DYLD_FALLBACK_LIBRARY_PATH", None) is None
os.environ["DYLD_FALLBACK_LIBRARY_PATH"] = new_path
else:
extra = ['-Xlinker -rpath,' + new_path]
return ' '.join( return ' '.join(
['-L%s' % os.path.join(sys.prefix, "lib")] + ['-L%s' % os.path.join(sys.prefix, "lib")] +
['-l%s' % l for l in blas_info['libraries']]) ['-l%s' % l for l in blas_info['libraries']])
...@@ -342,7 +351,8 @@ def default_blas_ldflags(): ...@@ -342,7 +351,8 @@ def default_blas_ldflags():
# we just pass the whole ldflags as the -l # we just pass the whole ldflags as the -l
# options part. # options part.
['-L%s' % l for l in blas_info['library_dirs']] + ['-L%s' % l for l in blas_info['library_dirs']] +
['-l%s' % l for l in blas_info['libraries']]) ['-l%s' % l for l in blas_info['libraries']] +
extra)
# ['-I%s' % l for l in blas_info['include_dirs']]) # ['-I%s' % l for l in blas_info['include_dirs']])
except KeyError: except KeyError:
return "-lblas" return "-lblas"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论