You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57Lines changed: 57 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -30,9 +30,66 @@ This will build the package in an isolated environment, generating a
30
30
source-distribution and wheel in the directory `dist/`.
31
31
See the [documentation](https://build.pypa.io) for full information.
32
32
33
+
### Common arguments
34
+
35
+
-`--sdist` (`-s`): Produce just an SDist
36
+
-`--wheel` (`-w`): Produce just a wheel
37
+
-`-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.
38
+
-`--installer`: Pick an installer for the isolated build (`pip` or `uv`).
-`--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.
41
+
-`--outdir (`-o`): The output directory (defaults to `dist`)
42
+
43
+
Some common combinations of arguments:
44
+
45
+
-`--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 wheel _from_ the SDist.
46
+
-`-nx`: Disable build isolation and dependency checking. Identical to pip and uv's `--no-build-isolation` flag.
47
+
48
+
### Integration with other tools
49
+
50
+
#### pipx
51
+
52
+
If you use [pipx][], such as in GitHub Actions, the following command will download
53
+
and run build in one step:
54
+
55
+
```console
56
+
$ pipx run build
57
+
```
58
+
59
+
#### uv
60
+
61
+
If you want to use [uv][] to speed up the virtual environment creation, you can use
62
+
`--installer=uv`. You can get a Python wheel for `uv` with the `[uv]` extra.
63
+
Combining both suggestions yields the following:
64
+
65
+
```console
66
+
$ pipx run build[uv] --installer=uv
67
+
```
68
+
69
+
#### cibuildwheel
70
+
71
+
If you are using [cibuildwheel][], build is integrated and can be use with either (in your `pyproject.toml`):
72
+
73
+
```toml
74
+
[tool.cibuildwheel]
75
+
build-frontend = "build"
76
+
```
77
+
78
+
or
79
+
80
+
```toml
81
+
[tool.cibuildwheel]
82
+
build-frontend = "build[uv]"
83
+
```
84
+
85
+
(Be sure to pre-install uv before running cibuildwheel for this one!)
86
+
33
87
### Code of Conduct
34
88
35
89
Everyone interacting in the build's codebase, issue trackers, chat rooms, and mailing lists is expected to follow
36
90
the [PSF Code of Conduct].
37
91
38
92
[psf code of conduct]: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
0 commit comments