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: docs/config/build.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,6 +180,22 @@ skip-excluded-dirs = true
180
180
!!! warning
181
181
This may result in not shipping desired files. For example, if you want to include the file `a/b/c.txt` but your [VCS ignores](#vcs)`a/b`, the file `c.txt` will not be seen because its parent directory will not be entered. In such cases you can use the [`force-include`](#forced-inclusion) option.
182
182
183
+
#### Compression level
184
+
185
+
You can change the level used for compressing the sdist tarballs and wheels. In some circumstances, lowering it from the default of 9 can massively reduce build times without affecting the output size too much.
186
+
187
+
Note that for widely distributed packages it probably makes the most sense to use the default, highest compression level to conserve the amount of bytes transferred over the network.
188
+
189
+
```toml config-example
190
+
[tool.hatch.build.targets.sdist]
191
+
compress-level = 1
192
+
193
+
[tool.hatch.build.targets.wheel]
194
+
compress-level = 1
195
+
```
196
+
197
+
Accepted values are 0 (no compression) to 9 (highest compression).
198
+
183
199
## Reproducible builds
184
200
185
201
By default, [build targets](#build-targets) will build in a reproducible manner provided that they support that behavior. To disable this, set `reproducible` to `false`:
0 commit comments