Python与打包发布
PyPI与包发布
1. pyproject.toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "my-package"
version = "1.0.0"
dependencies = ["requests>=2.28"]
2. 发布
python -m build
twine upload dist/*PyPI与包发布
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "my-package"
version = "1.0.0"
dependencies = ["requests>=2.28"]
python -m build
twine upload dist/*