Respect [tool.uv.sources] in build requirements (#7172)

## Summary

We weren't respecting `tool.uv.sources` for `build-requires`.

Closes https://github.com/astral-sh/uv/issues/7147.
This commit is contained in:
Charlie Marsh 2024-10-15 11:31:04 -04:00 committed by GitHub
parent 0943144cf5
commit 855c1917e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 459 additions and 65 deletions

View file

@ -27,6 +27,13 @@ artifacts in a `dist/` subdirectory.
Alternatively, `uv build <SRC>` will build the package in the specified directory, while
`uv build --package <PACKAGE>` will build the specified package within the current workspace.
!!! info
By default, `uv build` respects `tool.uv.sources` when resolving build dependencies from the
`build-system.requires` section of the `pyproject.toml`. When publishing a package, we recommend
running `uv build --no-sources` to ensure that the package builds correctly when `tool.uv.sources`
is disabled, as is the case when using other build tools, like [`pypa/build`](https://github.com/pypa/build).
## Publishing your package
Publish your package with `uv publish`: