提交 25ca9209 authored 作者: Frederic's avatar Frederic

Fix our algo to find MKL with Canopy on windows.

上级 c2c69a30
......@@ -209,7 +209,16 @@ def default_blas_ldflags():
p = os.path.join(sys.base_prefix, "..", "..", "appdata")
assert os.path.exists(p), "Canopy changed the location of MKL"
p2 = os.listdir(p)
assert len(p2) == 1, "Canopy changed the location of MKL"
subsub = 'lib'
if sys.platform == 'win32':
subsub = 'Scripts'
# Try to remove subdir that can't contain MKL
for sub in p2:
if not os.path.exists(os.path.join(p, sub, subsub)):
p2.remove(sub)
assert len(p2) == 1, ("Canopy changed the location of MKL",
p, p2, [os.listdir(os.path.join(p, sub))
for sub in p2])
if sys.platform == "linux2":
p2 = os.path.join(p, p2[0], "lib")
assert os.path.exists(p2), "Canopy changed the location of MKL"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论