01 软件打包与部署
打包与部署
setup.py 打包
# 1. 在用户目录下创建.pypirc文件。
# 添加权限:chmod 600 ~/.pypirc
[distutils]
index-servers = pypi
[pypi]
repository=https://upload.pypi.org/legacy/
username=******
password=******
# 2. 安装twine
pip install twine
# 3. 在项目根目录执行
python setup.py sdist bdist_wheel
# 4. 上传打包文件
twine upload dist/*setup.py 常用配置
Last updated