1、 __init__.py
2、模块1 模块2
3、setup.py
from distutils.core import setup
setup(name=‘modules_name‘,version=‘1.0‘,description=‘modules_desc‘,author=‘author‘,py_modules=[‘模块1‘,‘模块2‘])
python setup.py build
python setup.py sdist
ok
原文:https://www.cnblogs.com/pxfb/p/9265345.html