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

Support attempts to build sdists for foreign platforms. #2073

Closed
jsirois opened this issue Feb 27, 2023 · 1 comment · Fixed by #2075
Closed

Support attempts to build sdists for foreign platforms. #2073

jsirois opened this issue Feb 27, 2023 · 1 comment · Fixed by #2075

Comments

@jsirois
Copy link
Member

jsirois commented Feb 27, 2023

At least in the pex --lock case, Pex has a natural crease to attempt to build sdists into wheels, even for foreign platforms. In the "yolo" case, it can turn out the wheel does build successfully and is compatible with the foreign platform. This would allow the maximum possible set of platform and complete_platform builds to succeed. Only those that truly required pre-building the sdist into a wheel on the foreign platform would fail.

The standard (old) non-lockfile --platform resolve relies on Pip which rejects sdists and fails the pip download. That case can only be fixed by using --complete-platform instead, but that is the direction folks should move anyhow.

@jsirois jsirois self-assigned this Feb 28, 2023
This was referenced Feb 28, 2023
jsirois added a commit to jsirois/pex that referenced this issue Mar 1, 2023
The "cross-building" is in scare-quotes because this is not actually
cross-building, it is just attempting a build of the sdist, and, if
successful, seeing if the resulting wheel matches the foreign platform.
This enables sdist-only projects to be used in foregin platform Pex
operations when it turns out the sdist is multi-platform.

Closes pex-tool#2073
@jsirois
Copy link
Member Author

jsirois commented Mar 2, 2023

Instead of forcing migration from --platform to --complete-platform to enable this, I have --platform and --complete-platform using universal lock-style patching of Requires-Python evaluations and this allows all use cases of --platform and --complete-platform (normal resolve, lock resolve, lock creation, etc.) to be able to roll the yolo dice; so this ended up being a complete solution retroactively.

jsirois added a commit that referenced this issue Mar 2, 2023
The "cross-building" is in scare-quotes because this is not actually
cross-building, it is just attempting a build of the sdist, and, if
successful, seeing if the resulting wheel matches the foreign platform.
This enables sdist-only projects to be used in foreign platform Pex
operations when it turns out the sdist is multi-platform.

Closes #2073
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant