Skip to content

Restricting universal lock by OS still downloads wheels from all OSes #6512

@tmct

Description

@tmct

Hi - I'm very glad to see uv's recent universal locking features, and engagement with the lockfile standard - but I've found one behaviour that seems a little odd.

Perhaps I have misunderstood how environment markers are used in universal resolution, but I am surprised by this behaviour:

mkdir temp
cd temp
uv init -p 3.10

# I only want to produce a lockfile for Linux, across Python versions
cat <<EOL >> pyproject.toml

[tool.uv]
environments = ["sys_platform == 'linux'"]
EOL

uv add torch==2.1.0 -p 3.10

Result: I still get plently Windows-specific wheels in my uv.lock lockfile, e.g. torch-2.1.0-cp310-cp310-win_amd64.whl - presumably these have all still been downloaded.

Would it be possible please not to download these Mac/Windows-only wheels for linux-only universal locks, as an example?

Many thanks,
Tom

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improvement to existing functionalitygood first issueGood for newcomerslockRelated to universal resolution and locking

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions