uv/crates
konsti db4dfb4cf9
Add logging to the uv build backend (#15533)
Add support for `RUST_LOG` to the uv build backend. While we were
previously using logging statements in the uv build backend, they could
only be shown when when using the direct build fast path through uv, as
there was no tracing subscriber to write log messages out. This means no
debug logging when using the build backend through pip, `python -m
build`, an incompatible version of uv, or any other build frontend; No
option to figure why includes and excludes behave the way they do.

This PR closes this gap by adding a tracing subscriber. The only option
to enable it is `RUST_LOG`, as we don't have a CLI. The formatting style
is the same as for uv, and color is also support in the same way, albeit
only through anstream's support for TTYs and environment variables. We
recommend only `RUST_LOG=uv=debug` and `RUST_LOG=uv=verbose` in the
docs, but this can be used to debug into crates such as `glob`, too.

<img width="1008" height="325" alt="image"
src="https://github.com/user-attachments/assets/d33df219-750b-46a2-b3b4-8895aa137ab9"
/>

**Before**

```
$ pip wheel . -v [...]
Looking in links: /home/konsti/projects/uv/target/wheels/
Processing /home/konsti/projects/uv/scripts/packages/built-by-uv
  Running command pip subprocess to install build dependencies
  Looking in links: /home/konsti/projects/uv/target/wheels/
  Processing /home/konsti/projects/uv/target/wheels/uv_build-0.8.13-py3-none-manylinux_2_39_x86_64.whl
  Installing collected packages: uv_build
  Successfully installed uv_build-0.8.13
  Installing build dependencies ... done
  Running command Getting requirements to build wheel
  Getting requirements to build wheel ... done
  Running command Preparing metadata (pyproject.toml)
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: built-by-uv
  Running command Building wheel for built-by-uv (pyproject.toml)
  Error: Unsupported glob expression in: `tool.uv.build-backend.*-exclude`

  Caused by:
      Invalid character `!` at position 10 in glob: `**/build-*!$§%!½¼²¼³¬!§%$§%.h`. hint: Characters can be escaped with a backslash
  error: subprocess-exited-with-error

  × Building wheel for built-by-uv (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /usr/bin/python3 /usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpow1illc9
  cwd: /home/konsti/projects/uv/scripts/packages/built-by-uv
  Building wheel for built-by-uv (pyproject.toml) ... error
  ERROR: Failed building wheel for built-by-uv
Failed to build built-by-uv
ERROR: Failed to build one or more wheels
```

**After**

```
$ RUST_LOG=uv=debug pip wheel . -v [...]
Looking in links: /home/konsti/projects/uv/target/wheels/
Processing /home/konsti/projects/uv/scripts/packages/built-by-uv
  Running command pip subprocess to install build dependencies
  Looking in links: /home/konsti/projects/uv/target/wheels/
  Processing /home/konsti/projects/uv/target/wheels/uv_build-0.8.13-py3-none-manylinux_2_39_x86_64.whl
  Installing collected packages: uv_build
  Successfully installed uv_build-0.8.13
  Installing build dependencies ... done
  Running command Getting requirements to build wheel
  Getting requirements to build wheel ... done
  Running command Preparing metadata (pyproject.toml)
  DEBUG Writing metadata files to /tmp/pip-modern-metadata-l_kh78cj
  DEBUG Found PEP 639 license declarations, using METADATA 2.4
  DEBUG License files match: `LICENSE-APACHE`
  DEBUG License files match: `LICENSE-MIT`
  DEBUG License files match: `third-party-licenses/PEP-401.txt`
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: built-by-uv
  Running command Building wheel for built-by-uv (pyproject.toml)
  DEBUG Checking metadata directory /tmp/pip-modern-metadata-l_kh78cj/built_by_uv-0.1.0.dist-info
  DEBUG Found PEP 639 license declarations, using METADATA 2.4
  DEBUG License files match: `LICENSE-APACHE`
  DEBUG License files match: `LICENSE-MIT`
  DEBUG License files match: `third-party-licenses/PEP-401.txt`
  DEBUG Writing wheel at /tmp/pip-wheel-bu6to9i7/built_by_uv-0.1.0-py3-none-any.whl
  DEBUG Wheel excludes: ["__pycache__", "*.pyc", "*.pyo", "build-*!$§%!½¼²¼³¬!§%$§%.h", "/src/built_by_uv/not-packaged.txt"]
  Error: Unsupported glob expression in: `tool.uv.build-backend.*-exclude`

  Caused by:
      Invalid character `!` at position 10 in glob: `**/build-*!$§%!½¼²¼³¬!§%$§%.h`. hint: Characters can be escaped with a backslash
  error: subprocess-exited-with-error

  × Building wheel for built-by-uv (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /usr/bin/python3 /usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpjrxou13a
  cwd: /home/konsti/projects/uv/scripts/packages/built-by-uv
  Building wheel for built-by-uv (pyproject.toml) ... error
  ERROR: Failed building wheel for built-by-uv
Failed to build built-by-uv
ERROR: Failed to build one or more wheels
```

(There is no color in the above uv log statements, as pip doesn't
register as a TTY)

Fixes #12723
2025-08-27 09:14:00 +02:00
..
uv Add logging to the uv build backend (#15533) 2025-08-27 09:14:00 +02:00
uv-auth Make the use of `Self` consistent. (#15074) 2025-08-05 20:17:12 +01:00
uv-bench Move preview features into a dedicated crate (#15482) 2025-08-24 09:55:30 -04:00
uv-bin-install Add an experimental `uv format` command (#15017) 2025-08-21 06:33:18 -05:00
uv-build Add logging to the uv build backend (#15533) 2025-08-27 09:14:00 +02:00
uv-build-backend Fix uv_build wheel hashes (#15400) 2025-08-21 10:54:21 +02:00
uv-build-frontend Move preview features into a dedicated crate (#15482) 2025-08-24 09:55:30 -04:00
uv-cache Add an experimental `uv format` command (#15017) 2025-08-21 06:33:18 -05:00
uv-cache-info Follow links when cache-key is a glob (#13438) 2025-07-14 11:35:34 -04:00
uv-cache-key Add `DisplaySafeUrl` newtype to prevent leaking of credentials by default (#13560) 2025-05-27 00:05:30 +02:00
uv-cli Add `--python-platform` to `uv pip check` (#15486) 2025-08-24 14:14:42 -04:00
uv-client Rename some Simple API structs (#15530) 2025-08-26 13:55:58 +00:00
uv-configuration Move preview features into a dedicated crate (#15482) 2025-08-24 09:55:30 -04:00
uv-console Use consistent workspace inheritance (#15031) 2025-08-02 22:03:51 +02:00
uv-dev Add logging to the uv build backend (#15533) 2025-08-27 09:14:00 +02:00
uv-dirs Use workspace dependencies for crate dev-dependencies (#14903) 2025-07-25 13:57:49 -05:00
uv-dispatch Move preview features into a dedicated crate (#15482) 2025-08-24 09:55:30 -04:00
uv-distribution Cache `WHEEL` and `METADATA` reads in installed distributions (#15489) 2025-08-25 13:40:20 +00:00
uv-distribution-filename Reject already-installed wheels that don't match the target platform (#15484) 2025-08-25 09:20:54 -04:00
uv-distribution-types Rename some Simple API structs (#15530) 2025-08-26 13:55:58 +00:00
uv-extract Allow more trailing null bytes in zip files (#15452) 2025-08-22 14:50:07 +01:00
uv-fs Update Rust toolchain to 1.89 (#15157) 2025-08-08 13:01:52 +00:00
uv-git Update Rust toolchain to 1.89 (#15157) 2025-08-08 13:01:52 +00:00
uv-git-types Make the use of `Self` consistent. (#15074) 2025-08-05 20:17:12 +01:00
uv-globfilter additional use of Self, remove * and & where not needed (#15091) 2025-08-05 15:19:56 -05:00
uv-install-wheel Reject already-installed wheels that don't match the target platform (#15484) 2025-08-25 09:20:54 -04:00
uv-installer Cache `WHEEL` and `METADATA` reads in installed distributions (#15489) 2025-08-25 13:40:20 +00:00
uv-keyring Fix unused code warning around `entry_from_constructor` (#15525) 2025-08-26 13:30:46 +02:00
uv-logging Add logging to the uv build backend (#15533) 2025-08-27 09:14:00 +02:00
uv-macros Use consistent workspace inheritance (#15031) 2025-08-02 22:03:51 +02:00
uv-metadata Harden ZIP streaming to reject repeated entries and other malformed ZIP files (#15136) 2025-08-07 15:31:48 +01:00
uv-normalize Add `rkyv` implementation for Core Metadata (#15532) 2025-08-26 10:22:50 -04:00
uv-once-map Make the use of `Self` consistent. (#15074) 2025-08-05 20:17:12 +01:00
uv-options-metadata Make the use of `Self` consistent. (#15074) 2025-08-05 20:17:12 +01:00
uv-pep440 Update Rust toolchain to 1.89 (#15157) 2025-08-08 13:01:52 +00:00
uv-pep508 Add `rkyv` implementation for Core Metadata (#15532) 2025-08-26 10:22:50 -04:00
uv-performance-memory-allocator Update Rust crate mimalloc to v0.1.47 (#14207) 2025-06-23 12:07:09 +02:00
uv-platform Add an experimental `uv format` command (#15017) 2025-08-21 06:33:18 -05:00
uv-platform-tags additional use of Self, remove * and & where not needed (#15091) 2025-08-05 15:19:56 -05:00
uv-preview Move preview features into a dedicated crate (#15482) 2025-08-24 09:55:30 -04:00
uv-publish Respect `UV_HTTP_RETRIES` in `uv publish` (#15106) 2025-08-06 17:59:17 +02:00
uv-pypi-types Add `rkyv` implementation for Core Metadata (#15532) 2025-08-26 10:22:50 -04:00
uv-python Update Pyodide build number to 0.28.2 (#15523) 2025-08-26 00:58:20 +00:00
uv-redacted Make the use of `Self` consistent. (#15074) 2025-08-05 20:17:12 +01:00
uv-requirements Make the use of `Self` consistent. (#15074) 2025-08-05 20:17:12 +01:00
uv-requirements-txt additional use of Self, remove * and & where not needed (#15091) 2025-08-05 15:19:56 -05:00
uv-resolver Cache `WHEEL` and `METADATA` reads in installed distributions (#15489) 2025-08-25 13:40:20 +00:00
uv-scripts Import `PackageName` from `uv-normalize` (#15439) 2025-08-21 23:15:40 +00:00
uv-settings Add file-to-CLI overrides for build isolation configuration (#15437) 2025-08-21 23:54:39 +01:00
uv-shell Add fallback parent process detection to `uv tool update-shell` (#15356) 2025-08-18 13:48:34 -05:00
uv-small-str Update schemars 1.0.0 (#13693) 2025-06-24 21:43:31 +02:00
uv-state Make the use of `Self` consistent. (#15074) 2025-08-05 20:17:12 +01:00
uv-static Allow pinning managed Python versions to specific build versions (#15314) 2025-08-25 16:25:05 -05:00
uv-tool Move preview features into a dedicated crate (#15482) 2025-08-24 09:55:30 -04:00
uv-torch Avoid introducing unnecessary system dependency on CUDA (#15449) 2025-08-22 12:06:23 +01:00
uv-trampoline Update trampoline to ~1.87 nightly (#15052) 2025-08-06 12:45:04 +00:00
uv-trampoline-builder Use workspace dependencies for crate dev-dependencies (#14903) 2025-07-25 13:57:49 -05:00
uv-types Import `PackageName` from `uv-normalize` (#15439) 2025-08-21 23:15:40 +00:00
uv-version Bump version to 0.8.13 (#15423) 2025-08-21 13:52:39 -05:00
uv-virtualenv Refuse to remove non-virtual environments in `uv venv` (#15538) 2025-08-26 13:26:20 -04:00
uv-warnings Better warning chain styling (#14934) 2025-07-28 16:23:39 +00:00
uv-workspace Import `PackageName` from `uv-normalize` (#15439) 2025-08-21 23:15:40 +00:00
README.md Link to Dependency specifiers instead of PEP 508 (#8411) 2024-10-21 14:43:38 -04:00

README.md

Crates

uv-bench

Functionality for benchmarking uv.

uv-cache-key

Generic functionality for caching paths, URLs, and other resources across platforms.

uv-distribution-filename

Parse built distribution (wheel) and source distribution (sdist) filenames to extract structured metadata.

uv-distribution-types

Abstractions for representing built distributions (wheels) and source distributions (sdists), and the sources from which they can be downloaded.

uv-install-wheel-rs

Install built distributions (wheels) into a virtual environment.

uv-once-map

A waitmap-like concurrent hash map for executing tasks exactly once.

uv-pep440-rs

Utilities for interacting with Python version numbers and specifiers.

uv-pep508-rs

Utilities for parsing and evaluating dependency specifiers, previously known as PEP 508.

uv-platform-tags

Functionality for parsing and inferring Python platform tags as per PEP 425.

uv-cli

Command-line interface for the uv package manager.

uv-build-frontend

A PEP 517-compatible build frontend for uv.

uv-cache

Functionality for caching Python packages and associated metadata.

uv-client

Client for interacting with PyPI-compatible HTTP APIs.

uv-dev

Development utilities for uv.

uv-dispatch

A centralized struct for resolving and building source distributions in isolated environments. Implements the traits defined in uv-types.

uv-distribution

Client for interacting with built distributions (wheels) and source distributions (sdists). Capable of fetching metadata, distribution contents, etc.

uv-extract

Utilities for extracting files from archives.

uv-fs

Utilities for interacting with the filesystem.

uv-git

Functionality for interacting with Git repositories.

uv-installer

Functionality for installing Python packages into a virtual environment.

uv-python

Functionality for detecting and leveraging the current Python interpreter.

uv-normalize

Normalize package and extra names as per Python specifications.

uv-requirements

Utilities for reading package requirements from pyproject.toml and requirements.txt files.

uv-resolver

Functionality for resolving Python packages and their dependencies.

uv-shell

Utilities for detecting and manipulating shell environments.

uv-types

Shared traits for uv, to avoid circular dependencies.

uv-pypi-types

General-purpose type definitions for types used in PyPI-compatible APIs.

uv-virtualenv

A venv replacement to create virtual environments in Rust.

uv-warnings

User-facing warnings for uv.

uv-workspace

Workspace abstractions for uv.

uv-requirements-txt

Functionality for parsing requirements.txt files.