提交 23132b03 authored 作者: Pascal Lamblin's avatar Pascal Lamblin 提交者: Frederic

Try to make it work with Canopy without copying files

上级 ccc259cd
......@@ -1449,12 +1449,16 @@ def std_lib_dirs_and_libs():
python_lib_dirs = [os.path.join(os.path.dirname(python_inc), 'libs')]
if "Canopy" in python_lib_dirs[0]:
# Canopy store libpython27.a and libmsccr90.a in this directory.
# For some reason, these files are needed when compiling Python
# 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')
#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')
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)):
......@@ -1463,9 +1467,8 @@ def std_lib_dirs_and_libs():
"You need to install the package '" + lib +
"' from Canopy package manager."
)
else:
shutil.copyfile(os.path.join(src, f),
os.path.join(dest, f))
python_lib_dirs.insert(0, os.path.join(sys.prefix, 'libs'))
return [libname], python_lib_dirs
# Suppress -lpython2.x on OS X since the `-undefined dynamic_lookup`
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论