uv/crates/uv-configuration/src
Zanie Blue 6856a27711
Add extra-build-dependencies (#14735)
Replaces https://github.com/astral-sh/uv/pull/14092

Adds `tool.uv.extra-build-dependencies = {package = [dependency, ...]}`
which extends `build-system.requires` during package builds.

These are lowered via workspace sources, are applied to transitive
dependencies, and are included in the wheel cache shard hash.

There are some features we need to follow-up on, but are out of scope
here:

- Preferring locked versions for build dependencies
- Settings for requiring locked versions for build depencies

There are some quality of life follow-ups we should also do:

- Warn on `extra-build-dependencies` that do not apply to any packages
- Add test cases and improve error messaging when the
`extra-build-dependencies` resolve fails


-------

There ~are~ were a few open decisions to be made here

1. Should we resolve these dependencies alongside the
`build-system.requires` dependencies? Or should we resolve separately?
(I think the latter is more powerful? because you can override things?
but it opens the door to breaking your build)
2. Should we install these dependencies into the same environment? Or
should we layer it on top as we do elsewhere? (I think it's fine to
install into the same environment)
3. Should we respect sources defined in the parent project? (I think
yes, but then we need to lower the dependencies earlier — I don't think
that's a big deal, but it's not implemented)
4. Should we respect sources defined in the child project? (I think no,
this gets really complicated and seems weird to allow)
5. Should we apply this to transitive dependencies? (I think so)

---------

Co-authored-by: Aria Desires <aria.desires@gmail.com>
Co-authored-by: konstin <konstin@mailbox.org>
2025-07-30 09:53:07 -05:00
..
authentication.rs Remove unnecessary prefixes (#10158) 2024-12-25 14:18:01 -05:00
build_options.rs Reuse build (virtual) environments across resolution and installation (#14338) 2025-07-01 13:15:47 -04:00
concurrency.rs Add UV_CONCURRENT_INSTALLS variable in favor of RAYON_NUM_THREADS (#3646) 2024-05-17 23:12:37 -04:00
config_settings.rs Allow --config-settings-package to apply configuration settings at the package level (#14573) 2025-07-17 21:27:54 -04:00
constraints.rs Use a boxed slice for extras and groups (#12391) 2025-03-22 11:53:36 -04:00
dependency_groups.rs Support extras and dependency_groups markers on uv pip install and uv pip sync (#14755) 2025-07-21 12:48:47 +00:00
dry_run.rs Add uv sync --check flag (#12342) 2025-03-21 15:48:27 +00:00
editable.rs Add --no-editable support to uv sync and uv export (#7371) 2024-09-17 14:50:36 +00:00
export_format.rs Add uv export support for PEP 751 (#12955) 2025-04-21 21:21:17 +00:00
extras.rs Fix comment on extra_names (#14756) 2025-07-20 17:53:36 +00:00
hash.rs Turn --verify-hashes on by default (#9170) 2024-11-18 01:57:54 +00:00
install_options.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
lib.rs Set 4MB stack size for all threads, introduce UV_STACK_SIZE (#12839) 2025-04-16 09:27:46 +02:00
name_specifiers.rs Fix optional cfg gates (#14448) 2025-07-03 15:29:03 -05:00
overrides.rs Move lowered requirement source type out of uv-pypi-types (#12356) 2025-03-20 21:16:12 -04:00
package_options.rs Use Box<Path> in lieu of PathBuf for immutable structs (#12346) 2025-03-25 21:56:06 +00:00
preview.rs Add extra-build-dependencies (#14735) 2025-07-30 09:53:07 -05:00
project_build_backend.rs Unhide uv from --build-backend options (#14939) 2025-07-28 13:26:23 +00:00
required_version.rs Fix optional cfg gates (#14448) 2025-07-03 15:29:03 -05:00
sources.rs Reuse build (virtual) environments across resolution and installation (#14338) 2025-07-01 13:15:47 -04:00
target_triple.rs Bump --python-platform linux to manylinux_2_28 (#14300) 2025-07-17 17:20:21 -05:00
threading.rs Consistently use Ordering::Relaxed for standalone atomic use cases (#14190) 2025-06-24 12:30:26 -07:00
trusted_host.rs Fix optional cfg gates (#14448) 2025-07-03 15:29:03 -05:00
trusted_publishing.rs Implement trusted publishing (#7548) 2024-09-24 16:07:20 +00:00
vcs.rs Make uv init resilient against broken git (#12895) 2025-04-17 17:45:25 +02:00