-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 export creating constraint files that use python_full_version where they could be using just python_version #11610
Comments
Hm. We always normalize these to the full version for consistency, as it avoids subtle bugs #6126 We could simplify them back to Why can't you use Pex's
I'm not sure I entirely follow why they cannot support |
cc @jsirois I'd appreciate any context you could provide. |
We’re looking into using —complete-platform - that might work to unblock us here. |
@gibsondan definitely use @zanieb Pex historically (since maybe 2011) has supported cross-resolving with a It's a bad idea, since the information supplied is not enough to use to impersonate an interpreter on the foreign platform with full fidelity for the purposes of evaluating environment markers and wheel tags. That said, it works in many cases. I made the cases where it doesn't work strict. For It looks like uv often (always?) uses Hopefully that makes sense. Clearly Pex could go the extra mile, parse the marker condition and rewrite as |
Thanks for taking the time to write that up!
Yeah we always transform |
--complete-platform is working great, so this is no longer blocking for us. |
I'll close this out for now — we can reconsider if there are more use-cases where the normalization is problematic. |
Summary
Running 'uv export --no-hashes' on this pyproject.toml file:
Outputs this:
Note the line that says
Should this instead ve
?
python_full_version
is not available in all build environments, notably PEX when using the --platform argument: https://pex.readthedocs.io/en/v2.1.66/buildingpex.html#platformSo this issue makes it impossible to run
uv export
and pass the result into PEX to build a PEX file from a uv project.Platform
Darwin 23.6.0 arm64
Version
uv 0.4.8 (956cadd 2024-09-09)
Python version
Python 3.11.9
The text was updated successfully, but these errors were encountered: