一、打包
1.先建立文件夹distribution,文件夹用来存放我们将要用于发布的.py文件
2.在distribution文件夹中新建一个 setup.py文件代码如下:
3. cd到这个distrbution文件夹中
python setup.py sdist
sudo python setup.py install
setup.py文件的使用:
python setup.py build #编译
python setup.py install #安装包
python setup.py sdist #源码发布包
python setup.py bdist/bdist_egg #项目稳定二进制包
python setup.py bdist_rpm #rpm包
python setup.py upload #上传pypi
# create a distribution's .egg-info directory
python setup.py egg_info
# Install an .egg-info directory for the package
python setup.py install_egg_info
#set an option in setup.cfg or another config file
#save supplied options to setup.cfg or other config file
python setup.py setopt
python setup.py saveopts
setup.py文件:
setup.py中
1.先建立文件夹distribution,文件夹用来存放我们将要用于发布的.py文件
2.在distribution文件夹中新建一个 setup.py文件代码如下:
3. cd到这个distrbution文件夹中
python setup.py sdist
sudo python setup.py install
setup.py文件的使用:
python setup.py build #编译
python setup.py install #安装包
python setup.py sdist #源码发布包
python setup.py bdist/bdist_egg #项目稳定二进制包
python setup.py bdist_rpm #rpm包
python setup.py upload #上传pypi
# create a distribution's .egg-info directory
python setup.py egg_info
# Install an .egg-info directory for the package
python setup.py install_egg_info
#set an option in setup.cfg or another config file
#save supplied options to setup.cfg or other config file
python setup.py setopt
python setup.py saveopts
setup.py文件:
setup.py中