1.setup.py
from distutils.core import setup setup(name='Distutils', version='1.0', description='Python Distribution Utilities', author='Greg Ward', author_email='qq@ffff.nnnn', packages=['m'], )
''' Build命令编译 python setup.py build copying mmm.py -> buildlibm copying m\__init__.py -> buildlibm 在项目下多了build目录,有一个lib子目录,m目录下的*.py文件被复制了,但是子目录没有被复制 Install,安装 python setup.py install copying buildlibmmm.py -> C:UserslenovovenvpythonLibsite-packagesm copying buildlibm\__init__.py -> C:UserslenovovenvpythonLibsite-packagesm Writing C:UserslenovovenvpythonLibsite-packagesDistutils-1.0-py3.6.egg-info Sdist,分发
python setup.py sdist
创建源代码的分发包,产生一个dist的目录,放置一个带版本号的压缩包,
在其他地方解压这个文件 在python setup.py install 也可以用pip install '''
wheel
pip install wheel
from setuptools import setup setup(name='Distutils', version='1.0', description='Python Distribution Utilities', author='Greg Ward', author_email='qq@ffff.nnnn', packages=['m'], )