Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
3911f7a9
提交
3911f7a9
authored
11月 16, 2010
作者:
David Warde-Farley
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Brand-spanking new setup.py file.
上级
8da50633
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
123 行增加
和
13 行删除
+123
-13
setup.py
setup.py
+123
-13
没有找到文件。
setup.py
浏览文件 @
3911f7a9
...
@@ -2,20 +2,130 @@
...
@@ -2,20 +2,130 @@
#
#
# TODO:
# TODO:
# * Figure out how to compile and install documentation automatically
# * Figure out how to compile and install documentation automatically
# * Add back in installation requirements
# * Add download_url
# * Add download_url
import
os
import
subprocess
from
distutils.core
import
setup
CLASSIFIERS
=
"""
\
Development Status :: 4 - Beta
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Programming Language :: Python
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Compilers
Topic :: Scientific/Engineering :: Mathematics
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Operating System :: Unix
Operating System :: MacOS
"""
NAME
=
'Theano'
MAINTAINER
=
"LISA laboratory, University of Montreal"
MAINTAINER_EMAIL
=
"theano-dev@googlegroups.com"
DESCRIPTION
=
'Optimizing compiler for mathematical expressions'
LONG_DESCRIPTION
=
""
URL
=
"http://deeplearning.net/software/theano/"
DOWNLOAD_URL
=
""
LICENSE
=
'BSD'
CLASSIFIERS
=
filter
(
None
,
CLASSIFIERS
.
split
(
'
\n
'
))
AUTHOR
=
"LISA laboratory, University of Montreal"
AUTHOR_EMAIL
=
"thaeno-dev@googlegroups.com"
PLATFORMS
=
[
"Windows"
,
"Linux"
,
"Solaris"
,
"Mac OS-X"
,
"Unix"
]
MAJOR
=
0
MINOR
=
3
MICRO
=
0
ISRELEASED
=
False
setup
(
name
=
'Theano'
,
if
MICRO
>
0
:
version
=
'hg'
,
VERSION
=
'
%
d.
%
d.
%
d'
%
(
MAJOR
,
MINOR
,
MICRO
)
description
=
'Optimizing compiler for mathematical expressions'
,
else
:
author
=
'LISA laboratory, University of Montreal'
,
VERSION
=
"
%
d.
%
d"
%
(
MAJOR
,
MINOR
)
author_email
=
'theano-dev@googlegroups.com'
,
url
=
'http://www.deeplearning.net/software/theano'
,
# Return the hg revision as a string -- borrowed from hg_version in NumPy's
packages
=
[
'theano'
,
'theano.tensor'
,
'theano.gof'
,
# setup.py file
'theano.compile'
,
'theano.misc'
,
'theano.scalar'
,
def
hg_version
():
'theano.sparse'
,
def
_minimal_ext_cmd
(
cmd
):
'theano.tensor.nnet'
,
'theano.tensor.signal'
],
# construct minimal environment
)
env
=
{}
for
k
in
[
'SYSTEMROOT'
,
'PATH'
,
'PYTHONPATH'
]:
v
=
os
.
environ
.
get
(
k
)
if
v
is
not
None
:
env
[
k
]
=
v
# LANGUAGE is used on win32
env
[
'LANGUAGE'
]
=
'C'
env
[
'LANG'
]
=
'C'
env
[
'LC_ALL'
]
=
'C'
out
=
subprocess
.
Popen
(
cmd
,
stdout
=
subprocess
.
PIPE
,
env
=
env
)
.
communicate
()[
0
]
return
out
try
:
out
=
_minimal_ext_cmd
([
'hg'
,
'-q'
,
'id'
])
HG_REVISION
=
out
.
strip
()
.
decode
(
'ascii'
)
except
OSError
:
HG_REVISION
=
"unknown-hg"
return
HG_REVISION
def
write_version_py
(
filename
=
'theano/version.py'
):
cnt
=
"""
# THIS FILE IS GENERATED FROM THEANO SETUP.PY
short_version = '
%(version)
s'
version = '
%(version)
s'
hg_revision = '
%(hg_revision)
s'
full_version = '
%(version)
s.dev-
%%(hg_revision)
s'
%%
{'hg_revision': hg_revision}
release =
%(isrelease)
s
if not release:
version = full_version
"""
FULL_VERSION
=
VERSION
if
not
ISRELEASED
:
if
os
.
path
.
exists
(
'.hg'
):
HG_REVISION
=
hg_version
()
elif
os
.
path
.
exists
(
filename
):
# must be a source distribution, use existing version file
from
theano.version
import
hg_revision
as
HG_REVISION
else
:
HG_REVISION
=
"unknown-hg"
FULL_VERSION
+=
'.dev-'
+
HG_REVISION
a
=
open
(
filename
,
'w'
)
try
:
a
.
write
(
cnt
%
{
'version'
:
VERSION
,
'full_version'
:
FULL_VERSION
,
'hg_revision'
:
HG_REVISION
,
'isrelease'
:
str
(
ISRELEASED
)})
except
Exception
,
e
:
print
e
finally
:
a
.
close
()
def
do_setup
():
write_version_py
()
from
setuptools
import
setup
,
find_packages
setup
(
name
=
NAME
,
version
=
VERSION
,
description
=
DESCRIPTION
,
author
=
AUTHOR
,
author_email
=
AUTHOR_EMAIL
,
url
=
URL
,
license
=
LICENSE
,
packages
=
find_packages
(),
install_requires
=
[
'numpy>=1.3.0'
,
'scipy>=0.7.0'
],
package_data
=
{
''
:
[
'*.txt'
,
'*.rst'
,
'*.cu'
,
'*.cuh'
,
'*.sh'
],
'theano.misc'
:
[
'*.sh'
]
},
keywords
=
' '
.
join
([
'theano'
,
'math'
,
'numerical'
,
'symbolic'
,
'blas'
,
'numpy'
,
'gpu'
,
'autodiff'
,
'differentiation'
])
)
if
__name__
==
"__main__"
:
do_setup
()
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论