What is a build frontend?
A build frontend is a tool that invokes build backends to create Python packages. It manages the build environment and delegates the work of producing artifacts to the backend.
Build frontends in use
- pip: default package installer; builds packages during installation when no wheel is available
- build: dedicated PEP 517 builder from PyPA
- uv: acts as a build frontend via
uv build - poetry/hatch/pdm: project management tools with build capabilities
What a build frontend handles
- Discovering and loading the declared build backend
- Creating an isolated build environment
- Handling build configuration from pyproject.toml
- Processing build output (wheels and sdists)
- Reporting build progress and errors
Build frontends implement PEP 517’s standardized hook API for interacting with backends. Any compliant frontend can invoke any compliant backend.
Running builds
Using the build frontend:
python -m build . # Build both wheel and sdist
python -m build --wheel . # Build only wheel
python -m build --sdist . # Build only sdistUsing uv as a build frontend:
uv build # Build both formats
uv build --sdist # Build only sdist
uv build --wheel # Build only wheelLearn More
- What is a build backend? explains the tool that does the actual build work
- What is PEP 517? covers the standard that defined the frontend-backend interface
- build reference documents PyPA’s dedicated build frontend
- uv reference covers
uv buildand other uv commands
Last updated on