uv/scripts/packages/built-by-uv
konsti bb70382dac
Build backend: Default excludes (#9552)
When adding excludes, we usually don't want to include python cache
files. On the contrary, I haven't seen any project in my ecosystem
research that would want any of `__pycache__`, `*.pyc`, `*.pyo` to be
included. By moving them behind a `default-excludes` toggle, they are
always active even when defining custom excludes, but can be deactivated
if the user so chooses.

With includes and excludes being this small again, we can roll back the
include-exclude anchored difference to always using anchored globs (i.e.
you would need to use `**/build-*.h` below).

A pyproject.toml with custom settings with the change applied:

```toml
[project]
name = "foo"
version = "0.1.0"
readme = "README.md"
license-files = ["LICENSE*", "third-party-licenses/*"]

[tool.uv.build-backend]
# A file we need for the source dist -> wheel step, but not in the wheel itself (currently unused)
source-include = ["data/build-script.py"]
# A temporary or generated file we want to ignore
source-exclude = ["/src/foo/not-packaged.txt"]
# Headers are build-only
wheel-exclude = ["build-*.h"]

[tool.uv.build-backend.data]
scripts = "scripts"
data = "assets"
headers = "header"

[build-system]
requires = ["uv>=0.5.5,<0.6"]
build-backend = "uv"
```
2024-12-01 14:09:55 +01:00
..
assets Build backend: Support data files (#9197) 2024-11-19 12:59:59 +01:00
data-dir Build backend: Revamp include/exclude (#9525) 2024-12-01 11:32:35 +00:00
header Build backend: Support data files (#9197) 2024-11-19 12:59:59 +01:00
scripts Build backend: Support data files (#9197) 2024-11-19 12:59:59 +01:00
src/built_by_uv Build backend: Revamp include/exclude (#9525) 2024-12-01 11:32:35 +00:00
tests
third-party-licenses Build backend: Include readme and license files (#9149) 2024-11-15 14:41:39 +00:00
.gitignore
LICENSE-APACHE Build backend: Include readme and license files (#9149) 2024-11-15 14:41:39 +00:00
LICENSE-MIT Build backend: Include readme and license files (#9149) 2024-11-15 14:41:39 +00:00
pyproject.toml Build backend: Default excludes (#9552) 2024-12-01 14:09:55 +01:00
README.md
test.sh
uv.lock

built_by_uv

A package to be built with the uv build backend that uses all features exposed by the build backend.