Pytest进阶使用( 三 )

打包命令依赖包安装:

  • pip install setuptoolspython的包管理工具 , 负责安装和发布 , 尤其是安装拥有依赖关系的包
  • pip install wheel生成 *.whl格式的安装包,本质上也是一个压缩包
打包命令:(切到setup.py所在的目录下执行)
python setup.py sdist bdist_wheel
dist目录下.whl的文件,可以通过pip install 下载
发布命令
  • 【Pytest进阶使用】python3 -m pip install --user --upgrade twine## 安装twine工具
  • python3 -m twine upload --repository testpypi dist/*## 上传代码

推荐阅读