adata/docs/twine.md
1nchaos 7ca7eec7af docs
update index.md
2023-06-30 23:15:47 +08:00

833 B
Raw Permalink Blame History

打包上传的步骤

安装打包工具

python -m pip install --upgrade setuptools wheel

打包模块

### 创建存放模块的目录,执行如下命令
python setup.py sdist bdist_wheel

上传模块

安装用于发布模块的工具twine 【已安装无需重复安装】

python -m pip install --upgrade twine

pip install --upgrade twine

提示python -m 的作用是 run library module as a script (terminates option list)[作为脚本运行库模块(终止选项列表)]

发布(上传)

python -m twine upload --repository-url https://upload.pypi.org/legacy/  dist/*

twine upload --repository-url https://upload.pypi.org/legacy/  dist/*

注意上传时提示需要输入PyPI的用户名和密码.

测试在线安装模块