astral-sh/uv

Relative indexes are stored as absolute in the lockfile

Open

#15,055 opened on Aug 4, 2025

View on GitHub
 (12 comments) (1 reaction) (1 assignee)Rust (3,111 forks)batch import
buggood first issue

Repository metrics

Stars
 (84,934 stars)
PR merge metrics
 (Avg merge 6d 16h) (222 merged PRs in 30d)

Description

Question

Hi,

I have a project which (transitively) depends on PySide6. Since the aarch64 build of PySide6 depends on manylinux_2_39 which is not satisfied for our use case, we decided to build our own wheels for the use case. I want to use uv lock to generate a lock file suitable for all the platforms (i.e. windows/amd64, linux/x86_64, linux/aarch64). Therefore I use

environments = [
    "sys_platform == 'win32' and implementation_name == 'cpython' and platform_machine == 'AMD64'",
    "sys_platform == 'linux' and implementation_name == 'cpython' and (platform_machine == 'x86_64' or platform_machine == 'aarch64')"
]

and I also played around with required-environments instead. Unfortunately, there seems to be no way to specify the python-platform (e.g. aarch64-manylinux_2_35) in these definitions, or at least I didn't find one.

The problem I'm facing is that I can't convince uv to use our self-build wheel for the linux aarch64 platform and the pypi wheels for all other platforms. I have tried to play around with

  • index-strategy = "unsafe-best-match" (but it seems to either use pypi or the local wheel)
  • required-environments
  • platform-specific indices with marker = "platform_machine == 'aarch64'":
[tool.uv.sources]
pyside6 = [
    {index = "nexus", marker = "platform_machine == 'AMD64'"},
    {index = "flat-pyside6", marker = "platform_machine == 'aarch64'"},
]

[[tool.uv.index]]
name="flat-pyside6"
url="./path/to/pyside6-aarch64"

Are there any workarounds or suggestions for this use case?

Thanks!

Platform

windows/amd64, linux/x86_64, linux/aarch64

Version

uv 0.8.4

Contributor guide