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

Lock sdists in more cases for foreign platforms. #2508

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Aug 15, 2024

Previously, when locking for a foreign platform and only an sdist was
available, the lock would fail if the sdist's build backend did not
support the prepare_metadata_for_build_wheel PEP-517 hook and this
resulted in building a wheel that was platform specific and incompatible
with the foreign platform. Now, we grab the METADATA from the
incompatible wheel under the same motivation we do so for
--style universal locks: in general, the only sane thing to do is
assume metadata is consistent across all the distributions for a given
project release (even though we know this is not always true in the
wild; e.g.: PyTorch).

Previously, when locking for a foreign platform and only an sdist was
available, the lock would fail if the sdist's build backend did not
support the `prepare_metadata_for_build_wheel` PEP-517 hook and this
resulted in building a wheel that was platform specific and incompatible
with the foreign platform. Now, we grab the METADATA from the
incompatile wheel under the same motivation we do so for `--style
universal` locks: in general, the only sane thing to do is assume
metadata is consistent across all the distributions for a given project
release (even though we know this is not always true in the wild
(PyTorch)).
@jsirois jsirois merged commit c2f272c into pex-tool:main Aug 16, 2024
26 checks passed
@jsirois jsirois deleted the lock/sdist/accept-foreign-metadata branch August 16, 2024 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant