-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
uv pip compile
Does not retain PEP-508 environment markers in output
#1429
Comments
I'm surprised that |
If removing |
uv pip compile
does not respect ; implementation_name ==
specifiersuv pip compile
Does Not Respect PEP-508 Environment Markers
This is currently a blocker for python-trio/trio#2958 |
I'm open to including them but I don't know that it's a "correct" requirement. E.g., in the Trio example, it's not really "safe" to install from that file with a non-CPython implementation, because it could be missing dependencies that are required for PyPy or any other implementation. The locked requirements are only guaranteed to be correct on the same Python platform as that which generated the lock file. |
I don't think the markers are propagated either, though I haven't checked against pip-compile. We use I think that copying over the marker to the output, even if not necessarily "correct," is a step forward towards platform independent lockfiles. (is there an issue for that? I know there's a section in the readme) |
@A5rocks - There's a standardized proposal for multi-platform (but not platform-independent) installer files (to replace |
uv pip compile
Does Not Respect PEP-508 Environment Markersuv pip compile
Does not retain PEP-508 environment markers in output
Could markers like |
I have this in my my-lib@https://github.com/path-to-my-lib-wheel.whl; platform_system=="Windows" and python_version=="3.10" and
|
The grammar is technically ambiguous for some URLs so we require a space before the
|
Thanks for the quick reply, that was indeed the solution, tried it and it works now ❤️ |
Also pip-compile does not support the When you run pip compile it does not put |
uv pip compile
does not respect PEP-508 Environment Markers (such as; implementation_name ==
).For example, we have
test-requirements.in
:and running
> uv pip compile test-requirements.in -o test-requirements.txt
yields
black==24.2.0
instead ofblack==24.2.0 ; implementation_name == "cpython"
The text was updated successfully, but these errors were encountered: