
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
build
Advanced tools
A simple, correct Python build frontend.
See the documentation for more information.
build can be installed via pip or an equivalent via:
$ pip install build
$ python -m build
This will build the package in an isolated environment, generating a
source-distribution and wheel in the directory dist/. See the
documentation for full information. Build is also
available via the command line as pyproject-build once installed.
--sdist (-s): Produce just an SDist--wheel (-w): Produce just a wheel--metadata: Produce just the metadata as JSON. Cannot be used with --sdist/--wheel.-C<option>=<value>: A Config-setting, the PEP 517 way of passing options to a backend. Can be passed multiple times. Matching options will make a list. Note that setuptools has very limited support.--config-json=<value>: An alternative way to pass in complex config settings as JSON strings. Can't be used with -C.--installer: Pick an installer for the isolated build (pip or uv).--no-isolation (-n): Disable build isolation.--skip-dependency-check (-x): Disable dependency checking when not isolated; this should be done if some requirements or version ranges are not required for non-isolated builds.--outdir (-o): The output directory (defaults to dist)Some common combinations of arguments:
--sdist --wheel (-sw): Produce an SDist and a wheel, both from the source distribution. The default (if no flag is passed) is to build an SDist and then build a wheel from the SDist.-nx: Disable build isolation and dependency checking. Identical to pip and uv's --no-build-isolation flag.--metadata | jq -r .version: get the version in a bash-like environment.If you use pipx, such as in GitHub Actions, the following command will download and run build in one step:
$ pipx run build
If you want to use uv to speed up the virtual environment creation, you can
use --installer=uv. You can get a Python wheel for uv with the [uv]
extra. For example, using pipx like above:
$ pipx run 'build[uv]' --installer uv
If you already have uv, you don't need the extra. For example:
$ uvx --from build pyproject-build --installer uv
If you are using cibuildwheel, build is integrated and the default builder in 3.0+. If you want to use uv as the installer, you can use:
[tool.cibuildwheel]
build-frontend = "build[uv]"
(Be sure to pre-install uv before running cibuildwheel for this one!)
On conda-forge, this package is called python-build.
Everyone interacting with build's codebase, issue trackers, chat rooms, and mailing lists is expected to follow the PSF Code of Conduct.
FAQs
A simple, correct Python build frontend
We found that build demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.