Building and Distributing Packages with Setuptools#
Setuptools
is a collection of enhancements to the Python distutils
that allow developers to more easily build and
distribute Python packages, especially ones that have dependencies on other
packages.
Packages built and distributed using setuptools
look to the user like
ordinary Python packages based on the distutils
.
Transition to PEP517#
Since setuptools no longer serves as the default build tool, one must explicitly
opt in (by providing a pyproject.toml
file) to use this library. The user
facing part is provided by tools such as pip and
backend interface is described in this document. The
quickstart provides an overview of the new workflow.
setuptools
Quickstart- Package Discovery and Namespace Package
- Entry Points
- Dependencies Management in Setuptools
- Data Files Support
- “Development Mode”
- Tagging and “Daily Build” or “Snapshot” Releases
- Generating Source Distributions
- Distributing Extensions compiled with Cython
- Specifying Your Project’s Version
- Creating
distutils
Extensions - Configuring setup() using setup.cfg files
- New and Changed
setup()
Keywords - Command Reference
- Using setuptools to package and distribute your project
- Automatic Resource Extraction
- Defining Additional Metadata
- Setting the
zip_safe
flag