我曾经用setuptools.setup
分发python程序。
但现在我想用distutils.core.setup
。在
使用setuptools
时,我使用了与此类似的代码:
setup(
name = "radish",
version = "0.01.00",
description = "Behaviour-Driven-Development tool for python",
author = "Timo Furrer",
author_email = "tuxtimo@gmail.com",
url = "http://github.com/timofurrer/radish",
packages = [ "radish", "radish/Writers" ],
entry_points = { "console_scripts": [ "radish = radish.main:main", ] },
package_data = { "radish": [ "*.md" ] }
...
)
我想对distutils
做同样的处理,但是没有{
对于distutils,脚本只是文件,例如:
在安装脚本中,使用scripts参数列出这些文件。在
这在Unix上非常有效,如果用户/安装程序正确地设置了文件关联(不生成二进制包装器,就像setuptools所做的那样),也可以在Windows上运行。Windows需要.py扩展名,在Unix上也可以(不需要,而且对许多丑陋的人来说)。在
远不是完美的,但是如果你的受众是开发人员,或者不使用Windows,那么它可以工作。在
你不能,不能用
distutils
。它不支持entry_points
,这是setuptools特有的功能。在请改用^{} ;它支持python3。在
相关问题 更多 >
编程相关推荐