Skip to content

use uv tool for PyAV - #2398

Merged
WyattBlue merged 6 commits into
PyAV-Org:mainfrom
threexc:tgamblin/uv
Aug 27, 2026
Merged

use uv tool for PyAV#2398
WyattBlue merged 6 commits into
PyAV-Org:mainfrom
threexc:tgamblin/uv

Conversation

@threexc

@threexc threexc commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

uv is an all-in-one Python management tool written in Rust, which provides equivalents for pip, venv management, and so on. It's also much faster in general and supports more architectures (notably, riscv64) with setup-uv. This patch series reworks the PyAV repository to use uv everywhere, with the hope that it will simplify further development.

This is being done on behalf of RISE as a precursor to adding riscv64 support for PyAV using RISE's RISC-V Runners. Simpler riscv64 support was recently added in pyav-ffmpeg, although in that case it was a cross-build change. We are using the RISC-V Wheels dashboard to track Python compatibility for riscv64, and this package is one of many on the list we want to help add support for.

I've tested this on my fork: threexc#1

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Rework the workflow scripts to use uv, which is generally faster and
supports more architectures and features than default Python tooling.
The changes involve:

1. Use setup-uv instead of setup-python. The two actions are similar,
   but setup-uv supports more architectures (e.g. riscv64), so use it
   instead. Compared to setup-python, the `activate-enviroment` must be
   specified for the desired version to automatically configure it
   (except for armv7 jobs, to stay more consistent with existing
   behaviour). `allow-prereleases` is now handled via pyproject.toml,
   so we don't need that either.
2. 'uv pip' instead of 'pip' everywhere. Use '--seed' where necessary to
   ensure that created venvs contain pip.
3. Using uv for the cibuildwheel frontend in tests.yml.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
@WyattBlue
WyattBlue merged commit 80bd226 into PyAV-Org:main Aug 27, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants