Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
f120de51
提交
f120de51
authored
2月 27, 2015
作者:
abergeron
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2518 from nouiz/canopy_win
Canopy win
上级
af321154
45cebc10
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
24 行增加
和
6 行删除
+24
-6
cmodule.py
theano/gof/cmodule.py
+24
-6
没有找到文件。
theano/gof/cmodule.py
浏览文件 @
f120de51
...
@@ -1425,6 +1425,10 @@ def std_include_dirs():
...
@@ -1425,6 +1425,10 @@ def std_include_dirs():
def
std_lib_dirs_and_libs
():
def
std_lib_dirs_and_libs
():
# We cache the results as on Windows, this trigger file access and
# this method is called many times.
if
std_lib_dirs_and_libs
.
data
is
not
None
:
return
std_lib_dirs_and_libs
.
data
python_inc
=
distutils
.
sysconfig
.
get_python_inc
()
python_inc
=
distutils
.
sysconfig
.
get_python_inc
()
if
sys
.
platform
==
'win32'
:
if
sys
.
platform
==
'win32'
:
# Obtain the library name from the Python version instead of the
# Obtain the library name from the Python version instead of the
...
@@ -1452,25 +1456,39 @@ def std_lib_dirs_and_libs():
...
@@ -1452,25 +1456,39 @@ def std_lib_dirs_and_libs():
#sys.base_prefix support only one case
#sys.base_prefix support only one case
libdir
=
os
.
path
.
join
(
sys
.
prefix
,
'libs'
)
libdir
=
os
.
path
.
join
(
sys
.
prefix
,
'libs'
)
for
f
,
lib
in
[(
'libpython27.a'
,
'libpython 1.2'
),
for
f
,
lib
in
[(
'libpython27.a'
,
'libpython 1.2'
)]:
(
'libmsvcr90.a'
,
'mingw 4.5.2'
)]:
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
libdir
,
f
)):
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
libdir
,
f
)):
print
(
"Your Python version is from Canopy. "
+
print
(
"Your Python version is from Canopy. "
+
"You need to install the package '"
+
lib
+
"You need to install the package '"
+
lib
+
"' from Canopy package manager."
"' from Canopy package manager."
)
)
libdirs
=
[
# Used in older Canopy
os
.
path
.
join
(
sys
.
prefix
,
'libs'
),
# Used in newer Canopy
os
.
path
.
join
(
sys
.
prefix
,
'EGG-INFO
\
mingw
\
usr
\x86
_64-w64-mingw32
\
lib'
)]
for
f
,
lib
in
[(
'libmsvcr90.a'
,
'mingw 4.5.2 or 4.8.1-2 (newer could work)'
)]:
if
not
any
([
os
.
path
.
exists
(
os
.
path
.
join
(
libdir
,
f
))
for
libdir
in
libdirs
]):
print
(
"Your Python version is from Canopy. "
+
"You need to install the package '"
+
lib
+
"' from Canopy package manager."
)
python_lib_dirs
.
insert
(
0
,
libdir
)
python_lib_dirs
.
insert
(
0
,
libdir
)
std_lib_dirs_and_libs
.
data
=
[
libname
],
python_lib_dirs
return
[
libname
],
python_lib_dirs
# Suppress -lpython2.x on OS X since the `-undefined dynamic_lookup`
# Suppress -lpython2.x on OS X since the `-undefined dynamic_lookup`
# makes it unnecessary.
# makes it unnecessary.
elif
sys
.
platform
==
'darwin'
:
elif
sys
.
platform
==
'darwin'
:
return
[],
[]
std_lib_dirs_and_libs
.
data
=
[],
[]
else
:
else
:
# Typical include directory: /usr/include/python2.6
# Typical include directory: /usr/include/python2.6
libname
=
os
.
path
.
basename
(
python_inc
)
libname
=
os
.
path
.
basename
(
python_inc
)
return
[
libname
],
[]
std_lib_dirs_and_libs
.
data
=
[
libname
],
[]
return
std_lib_dirs_and_libs
.
data
std_lib_dirs_and_libs
.
data
=
None
def
std_libs
():
def
std_libs
():
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论