astral-sh/uv

Relative indexes are stored as absolute in the lockfile

Open

#15.055 aperta il 4 ago 2025

Vedi su GitHub
 (12 commenti) (1 reazione) (1 assegnatario)Rust (3111 fork)batch import
buggood first issue

Metriche repository

Star
 (84.934 star)
Metriche merge PR
 (Merge medio 7g 16h) (259 PR mergiate in 30 g)

Descrizione

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

Guida contributor