astral-sh/uv

Relative indexes are stored as absolute in the lockfile

Aberta

#15.055 aberto em 4 de ago. de 2025

 (12 comentários) (1 reação) (1 responsável)Rust (3.111 forks)batch import
buggood first issue

Métricas do repositório

Stars
 (84.934 estrelas)
Métricas de merge de PR
 (Mesclagem média 7d 16h) (259 fundiu PRs em 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

Guia do colaborador