Packaging Ecosystem
How Python packages are built and published.
Intermediate
This is an overview — pick a sub-topic below.
Sub-topics (5)
PyPI, Wheels and Source Distributions
The Python Package Index hosts packages as wheels (pre-built) and sdists (source).
Easy♥ 0🔖 0💬 0
pyproject.toml and Build Backends
One file declares metadata, dependencies and the build backend (hatchling, setuptools, flit, pdm-backend, maturin).
Intermediate♥ 0🔖 0💬 0
Publishing with build and twine
`python -m build` then `twine upload dist/*` — or `uv publish`.
Intermediate♥ 0🔖 0💬 0
Versioning, Lock Files and Dependency Resolution
Semantic versioning, pinned lock files (uv.lock, poetry.lock) and resolvers that find compatible versions.
Intermediate♥ 0🔖 0💬 0
cibuildwheel, scikit-build-core and maturin
Build binary wheels for every platform (cibuildwheel) and package C/C++ (scikit-build-core) or Rust (maturin) extensions.
Advanced♥ 0🔖 0💬 0
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.