使用 Setuptools 建置並散佈軟體包¶
The first step towards sharing a Python library or program is to build a
distribution package [1]. This includes adding a set of
additional files containing metadata and configuration to not only instruct
setuptools on how the distribution should be built but also
to help installer (such as pip) during the installation process.
This document contains information to help Python developers through this process. Please check the Quickstart for an overview of the workflow.
Also note that setuptools is what is known in the community as build
backend, user facing interfaces are provided by tools
such as pip and build. To use setuptools, one must
explicitly create a pyproject.toml file as described 建置系統支援.
Contents¶
- Quickstart
- 支援的介面
- Package Discovery and Namespace Packages
- Setuptools 中的依賴管理
- 開發模式(又稱「可編輯安裝」)
- 進入點
- Data Files Support
- 建置擴充模組
- Specifying Your Project's Version
- Controlling files in the distribution
- Caching and Troubleshooting
- Extending or Customizing Setuptools
- Configuring setuptools using
setup.cfgfiles - Configuring setuptools using
pyproject.tomlfiles
---
Notes