python-build will invoke the PEP 517 hooks to build a distribution package. It is a simple build tool, it does no dependency management.
The recommended way to invoke is by calling the module:
python -m build¶
usage: python -m build [-h] [--sdist] [--wheel] [--outdir dist] [--skip-dependencies] [--no-isolation] [--config-setting CONFIG_SETTING] [.]
source directory (defaults to current directory)
show this help message and exit
build a source package
build a wheel
does not check for the dependencies
do not isolate the build in a virtual environment
pass option to the backend
python-build script is also available, so that tools such as pipx
can use it:
usage: python-build [-h] ...
By default python-build will build the package in a isolated environment, but
this behavior can be disabled with
The in the Python ecosystem, the build system tools and the package management are very intertwined. While it might be useful for user to be able to access all this capabilities in a single project (such as pip), there are several use- cases where this is not desirable. The main being custom environments (outside PyPI) or situations where the user does its own package management, such as Linux distributions.
As it is intended to be used by users that do their own package management, we will try to keep dependencies to a minimum, in order to try make bootstrapping easier.
The recommended way is to checkout the git tags, as they are PGP signed with one of the following keys:
Difference from other tools¶
setup.py sdist bdist_wheel¶
python-build is roughly the equivalent of
setup.py sdist bdist_wheel but
with PEP 517 support.
python -m pep517.build¶
python-build implements a CLI tailored to end users.
pep517.build “implements essentially the simplest possible frontend tool,
to exercise and illustrate how the core functionality can be used”.
This package can build itself with only the
--skip-dependencies flag should be used in this case.
python-build is verified to be compatible with the following Python