Open keith opened 1 week ago
I think the reason for this surprising behaviour is https://github.com/bazelbuild/rules_python/blob/7d4b8a559c59339f6916f1aa6358132194842537/python/private/pypi/parse_requirements.bzl#L88
We would have to have a fix there and ensure that it works with env markers.
If I have a
requirements.in
like this:Which I use to generate a universal requirements.txt with uv using:
uv pip compile --universal requirements.in -o requirements_lock.txt --emit-index-url --no-strip-markers
, I end up with multiple entries for torch in that lockfile:When I attempt to pull those in with:
and use them with:
It fails with:
If I remove the non-matching entry from the lockfile it works, so I assume it's the nature of having 2 conflicting requirements even though they are disambiguated by the marker.
To repro in this project: repro.zip
Run
bazel fetch ...