Skip to content

[poetry] when running prep_binary_for_pypi inject linux metadata to all wheels #6681

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

atalman
Copy link
Contributor

@atalman atalman commented May 29, 2025

This PR injects linux dependencies to non-linux wheels before uploading them to pypi.

Related to Poetry issue:
pytorch/pytorch#152121

Metadata injection required since it was removed by this PR:
pytorch/pytorch#152333

Copy link

vercel bot commented May 29, 2025

@atalman is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 29, 2025
@@ -17,7 +18,41 @@
from pathlib import Path


def process_wheel(whl_file, output_dir=None):
cuda_metadata_inject = """Requires-Dist: nvidia-cuda-nvrtc-cu12==12.6.77; platform_system == "Linux" and platform_machine == "x86_64"
Copy link
Contributor Author

@atalman atalman May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not really fan of this section.

One Possibility is to Construct this on the fly from:
https://github.com/pytorch/pytorch/blob/main/.github/scripts/generate_binary_build_matrix.py#L58

Triton can be extracted from here:
https://github.com/pytorch/pytorch/blob/main/.ci/docker/triton_version.txt

Let me know what you think, I can iterate on this PR and add the logic to construct these requirements on the fly.

Keeping it simple for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants