mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
![]() 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" ``` |
||
---|---|---|
.. | ||
benchmark | ||
links | ||
packages | ||
popular_packages | ||
publish | ||
requirements | ||
scenarios | ||
workspaces | ||
check_cache_compat.py | ||
check_embedded_python.py | ||
check_system_python.py | ||
release.sh | ||
sync_scenarios.sh | ||
transform_readme.py | ||
update_schemastore.py | ||
uv-run-remote-script-test.py |