Search notes:

Python library: build

pip install build

Building a package

python3 -m build

Some arguments

--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 (default is dist)

Required files

python -m build requires pyproject.toml or setup.py.

See also

The twine library.

Index