2015-02-11 33 views

回答

3

你可以用setup.py和你的模塊逃脫 - 沒有額外的目錄。在你的setup.py只需使用setup(..., py_modules=['one_file'], ...)(你可能想檢查確切的拼寫)。要安裝腳本,您可以使用console_scripts入口點:

from setuptools import setup 
setup(
    name='one-file', 
    version='1.0', 
    py_modules=['one_file'], 
    entry_points={'console_scripts': ['one-file = one_file:main']} 
) 
相關問題