source distribution
A package file containing a project's source code and metadata, from which an installer can build and install it.
In more detail
python -m build produces one alongside the wheel, as a .tar.gz archive. pip uses it only when no suitable wheel exists.
Related terms
- wheel — The standard ready-to-install package file for Python, with a .whl extension, which pip can install without building anything.
- python -m build — The standard command that turns a project described by pyproject.toml into installable package files, a wheel and a source distribution, in the dist folder.
- build backend — The library a Python project names to turn its source into installable files; the build frontend, such as pip, calls it.
- install-time hook — Code a package runs while it is being installed or built, before you ever import it.
Taught in
- Shipping: scripts, entry points and git — Hands-on Python: Complete Video Course & Book
- Dependency Risk And Typosquatting — Application Security & Threat Modeling for Engineers