Skip to content

What is a build frontend?

A build frontend is a tool that invokes build backends to create Python packages. It typically creates an isolated environment for the build and delegates the work of producing artifacts to the backend.

Which build frontends are there?

  • pip: the default package installer; acts as a build frontend when installing a package from source with no matching wheel
  • build: PyPA’s dedicated PEP 517 build tool, designed specifically for producing packages
  • uv: acts as a build frontend via uv build
  • poetry, hatch, pdm: project management tools with build capabilities

What does a build frontend do?

When you run a build command, the frontend reads the [build-system] table in pyproject.toml to find the declared backend and its build requirements. It then typically creates an isolated environment, installs those requirements there, and calls the backend’s hook functions to produce wheels and sdists.

Note

Build backends implement PEP 517’s standardized hook API, and frontends call those hooks through it. Any compliant frontend can invoke any compliant backend.

Run a build

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 sdist

Using uv as a build frontend:

uv build                      # Build both formats
uv build --sdist             # Build only sdist
uv build --wheel             # Build only wheel

Learn More

Last updated on