Files
tldr/pages.zh/common/twine.md

36 lines
899 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# twine
> 在 PyPI 上发布 Python 包的工具。
> 更多信息:<https://twine.readthedocs.io/en/stable/#commands>。
- 上传到 PyPI
`twine upload dist/*`
- 上传到测试 PyPI [r]epository 以验证内容是否正确:
`twine upload -r testpypi dist/*`
- 使用指定的 [u]sername 和 [p]assword 上传到 PyPI
`twine upload -u {{username}} -p {{password}} dist/*`
- 上传到替代的存储库 URL
`twine upload --repository-url {{repository_url}} dist/*`
- 检查你的分发的长描述是否能够在 PyPI 上正确渲染:
`twine check dist/*`
- 使用特定的 pypirc 配置文件上传:
`twine upload --config-file {{configuration_file}} dist/*`
- 如果某个文件已经存在,继续上传文件(仅在上传到 PyPI 时有效):
`twine upload --skip-existing dist/*`
- 上传到 PyPI并显示详细信息
`twine upload --verbose dist/*`