mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
![]() When building the source distribution, we always need to include `pyproject.toml` and the module, when building the wheel, we always include the module but nothing else at top level. Since we only allow a single module per wheel, that means that there are no specific wheel includes. This means we have source includes, source excludes, wheel excludes, but no wheel includes: This is defined by the module root, plus the metadata files and data directories separately. Extra source dist includes are currently unused (they can't end up in the wheel currently), but it makes sense to model them here, they will be needed for any sort of procedural build step. This results in the following fields being relevant for inclusions and exclusion: * `pyproject.toml` (always included in the source dist) * project.readme: PEP 621 * project.license-files: PEP 639 * module_root: `Path` * source_include: `Vec<Glob>` * source_exclude: `Vec<Glob>` * wheel_exclude: `Vec<Glob>` * data: `Map<KnownDataName, Path>` An opinionated choice is that that wheel excludes always contain the source excludes: Otherwise you could have a path A in the source tree that gets included when building the wheel directly from the source tree, but not when going through the source dist as intermediary, because A is in source excludes, but not in the wheel excludes. This has been a source of errors previously. In the process, I fixed a bug where we would skip directories and only include the files and were missing license due to absolute globs. |
||
---|---|---|
.. | ||
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 |