一个关于setup.py小概念
关于python setup.py bdistpython setup.py sdist两者的区别sdist 指的是source dist 即源码发布,带setup.pybdist 指的是built (binary) dist 即编译过(二进制)发布 不带setup.py查看setup.py各种编译命令参数python setup.py --help-commands查看具体某个命令参数python setup.py bdist --help查看setup.py配置的参数 python setup.py --help一个实际的例子from distutils.core import setupsetup(name="ccy", version="1.0", description="ccy's module", package_dir={'':'c1'}, packages=["c11","c12","c11.c111"], author="ccy")编译成exe,可以选择安装目录python setup.py bdist_wininst测试编译安装成果#TestMyPkg.pyfrom c11.f11 import my11my11.showmyself()