Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

override-dependencies with different environment markers leads to error #9803

Closed
mcschempp opened this issue Dec 11, 2024 · 1 comment · Fixed by #9893
Closed

override-dependencies with different environment markers leads to error #9803

mcschempp opened this issue Dec 11, 2024 · 1 comment · Fixed by #9893
Assignees
Labels
bug Something isn't working

Comments

@mcschempp
Copy link

mcschempp commented Dec 11, 2024

Environment Info:

uv: 0.5.7
os: Ubuntu 22.04.5 LTS

Using the following paragraph in pyproject.toml ...

[tool.uv]
override-dependencies = [
    "some-lib @ file:///${PROJECT_ROOT}/libs/some-lib-1.4.1-cp311.cp312-none-linux_x86_64.whl; platform_machine == 'x86_64'",
    "some-lib @ file:///${PROJECT_ROOT}/libs/some-lib-1.4.1-cp311.cp312-none-linux_aarch64.whl; platform_machine == 'aarch64'",
]

... leads to the following error:
uv sync

error: Overrides contain conflicting URLs for package `some-lib`:
- file:///${PROJECT_ROOT}/libs/some-lib-1.4.1-cp311.cp312-none-linux_x86_64.whl
- file:///${PROJECT_ROOT}/libs/some-lib-1.4.1-cp311.cp312-none-linux_aarch64.whl

Not sure if I'm doing something wrong here, but imho this should work since the URLs are for different platforms.

EDIT:

I got it to work with

[tool.uv.sources]
some-lib = [
    { path = "libs/some-lib-1.4.1-cp311.cp312-none-linux_x86_64.whl", marker = "platform_machine == 'x86_64'" },
    { path = "libs/some-lib-1.4.1-cp311.cp312-none-linux_aarch64.whl", marker = "platform_machine == 'aarch64'" },
    { path = "", marker = "platform_machine != 'x86_64' and platform_machine != 'aarch64'" }

So this ticket can (probably) be closed

@charliermarsh charliermarsh added the bug Something isn't working label Dec 11, 2024
@charliermarsh
Copy link
Member

Thanks. I think what you have above should probably still work so I'll leave this open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants