尝试entry_points.console_scripts
在setup()调用中使用参数。如setuptools docs中所述,这应该可以完成我认为想要的操作。
要在此处复制:
from setuptools import setup
setup(
# other arguments here...
entry_points = {
'console_scripts': [
'foo = package.module:func',
'bar = othermodule:somefunc',
],
}
)