提交 84ec31fe authored 作者: Pascal Lamblin's avatar Pascal Lamblin 提交者: Frederic

Use sys.base_prefix instead of sys.prefix, more stable.

上级 3ccf1895
......@@ -1453,21 +1453,16 @@ def std_lib_dirs_and_libs():
# modules, even when libpython27.lib and python27.dll are
# available, and the *.a files have to be found earlier than
# the other ones.
#python_lib_dirs.append(os.path.join(sys.prefix, 'libs'))
# This do not work, but if we copy those 2 files in the
# python_lib_dirs, it work.
#src = os.path.join(sys.prefix, 'libs')
#dest = os.path.join(sys.prefix, '..', 'App', 'appdata')
#dest = os.path.join(dest, os.listdir(dest)[0], 'libs')
libdir = os.path.join(sys.base_prefix, '..', '..', '..',
'User', 'libs')
for f, lib in [('libpython27.a', 'libpython 1.2'),
('libmsvcr90.a', 'mingw 4.5.2')]:
if not os.path.exists(os.path.join(dest, f)):
if not os.path.exists(os.path.join(src, f)):
print ("Your python version is from Canopy. " +
"You need to install the package '" + lib +
"' from Canopy package manager."
)
python_lib_dirs.insert(0, os.path.join(sys.prefix, 'libs'))
if not os.path.exists(os.path.join(libdir, f)):
print ("Your python version is from Canopy. " +
"You need to install the package '" + lib +
"' from Canopy package manager."
)
python_lib_dirs.insert(0, libdir)
return [libname], python_lib_dirs
......
......@@ -199,8 +199,7 @@ def default_blas_ldflags():
['-l%s' % l for l in blas_info['libraries']])
#Canopy
if "Canopy" in sys.prefix:
p = os.path.join(sys.prefix, "..", "..", "..",
"Canopy", "appdata")
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"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论