1.python打包setuptools实例详述(一篇文章学会打包)(tcy)
2.python路径/模块搜索路径/当前目录/site模块详解(tcy)https://mp.csdn.net/postedit/92018710
3.python setuptools参数https://mp.csdn.net/postedit/91886555
4.创建打包文件https://mp.csdn.net/postedit/91883300(本文)
5.包的导入https://mp.csdn.net/postedit/91645878
6.蟒蛇模块与包https://mp.csdn.net/postedit/91651312
7.蟒蛇包的安装https://mp.csdn.net/postedit/91647056
===========================================================
4.创建打包文件:
1.1.分类:
sdist: #构建源码分发包(Windows下zip格式,Linux下为tag.gz 格式 )
bdist: #构建二进制分发包(安装更快)
bdist_egg: #构建egg 分发包替代bdist模式
bdist_wininst #wininst打出exe安装文件,点击安装
1.2.参考:https://docs.python.org/3/distributing/index.html
===========================================================
2.创建包
#创建tar.gz包
python setup.py sdist
python setup.py sdist --formats=gztar,zip#打出.tar.gz和.zip包
#创建egg包:
python setup.py bdist_egg #MyApp-1.0-py3.6.egg 应用名-版本号-Python版本.egg
#创建wheel包:
python3 -m pip install --user --upgrade setuptools wheel
python setup.py bdist_wheel # 在dist目录中生成xxx.whl,支持 Python2,3
创建windows exe安装包:
python setup.py bdist_wininst
python setup.py bdist --formats=wininst
#build
python setup.py build
===========================================================