Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/buildPublic

A simple, correct Python build frontend

License

NotificationsYou must be signed in to change notification settings

pypa/build

Repository files navigation

pre-commit.ci statusCI testcodecov

Documentation StatusPyPI versionDiscord

A simple, correct Python build frontend.

See thedocumentation for more information.

Installation

build can be installed viapip or an equivalent via:

$pip install build

Usage

$python -m build

This will build the package in an isolated environment, generating asource-distribution and wheel in the directorydist/.See thedocumentation for full information.

Common arguments

  • --sdist (-s): Produce just an SDist
  • --wheel (-w): Produce just a 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.
  • --installer: Pick an installer for the isolated build (pip oruv).
  • --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 todist)

Some common combinations of arguments:

  • --sdist --wheel (-sw): Produce and 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 wheelfrom the SDist.
  • -nx: Disable build isolation and dependency checking. Identical to pip and uv's--no-build-isolation flag.

Integration with other tools

pipx

If you usepipx, such as in GitHub Actions, the following command will downloadand run build in one step:

$pipx run build

uv

If you want to useuv to speed up the virtual environment creation, you can use--installer=uv. You can get a Python wheel foruv with the[uv] extra.Combining both suggestions yields the following:

$pipx run build[uv] --installer=uv

cibuildwheel

If you are usingcibuildwheel, build is integrated and can be use with either (in yourpyproject.toml):

[tool.cibuildwheel]build-frontend ="build"

or

[tool.cibuildwheel]build-frontend ="build[uv]"

(Be sure to pre-install uv before running cibuildwheel for this one!)

Conda-forge

On conda-forge, this package is calledpython-build.

Code of Conduct

Everyone interacting in the build's codebase, issue trackers, chat rooms, and mailing lists is expected to followthePSF Code of Conduct.


[8]ページ先頭

©2009-2025 Movatter.jp