Try the entry_points.console_scripts
parameter in the setup() call. As described in the setuptools docs, this should do what I think you want.
To reproduce here:
from setuptools import setup
setup(
# other arguments here...
entry_points = {
'console_scripts': [
'foo = package.module:func',
'bar = othermodule:somefunc',
],
}
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…