dbr*_*dbr 40 python command-line packaging
我当前的setup.py脚本运行正常,但它将tvnamer.py(工具)安装tvnamer.py到site-packages或类似的地方..
我可以setup.py安装tvnamer.py的tvnamer,和/或是否有安装命令行应用程序的更好的办法?
Bla*_*rad 34
尝试entry_points.console_scriptssetup()调用中的参数.正如setuptools文档中所述,这应该做我认为你想要的.
要在这里重现:
from setuptools import setup
setup(
# other arguments here...
entry_points = {
'console_scripts': [
'foo = package.module:func',
'bar = othermodule:somefunc',
],
}
)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6263 次 |
| 最近记录: |