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

Ensure that pip check does not fail due to bad platform tag #10755

Merged
merged 10 commits into from
Aug 28, 2024

Conversation

hcho3
Copy link
Collaborator

@hcho3 hcho3 commented Aug 26, 2024

Closes #10705

sysconfig.get_platform does not report an accurate platform tag; to use a correct platform tag, use pip.

@hcho3 hcho3 changed the title Remove custom tag generation Ensure that pip check does not fail due to bad platform tag Aug 26, 2024
python-package/pyproject.toml Outdated Show resolved Hide resolved
@hcho3
Copy link
Collaborator Author

hcho3 commented Aug 27, 2024

@lorepirri Can I get a review for this fix?

Copy link
Contributor

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

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

Thanks Hyunsu! 🙏

Am wondering if just using packaging directly might be more straightforward. Included a suggestion along these lines below

Please let me know what you think 🙂

python-package/hatch_build.py Outdated Show resolved Hide resolved
python-package/pyproject.toml Outdated Show resolved Hide resolved
hcho3 and others added 2 commits August 27, 2024 14:58
Co-authored-by: jakirkham <jakirkham@gmail.com>
- "nvidia-nccl-cu12 ; platform_system == 'Linux' and platform_machine != 'aarch64'"
+ "scipy"
"scipy",
- "nvidia-nccl-cu12 ; platform_system == 'Linux' and platform_machine != 'aarch64'",
Copy link
Contributor

Choose a reason for hiding this comment

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

As a note to reviewers, GitHub PR diffs of patches can look confusing

Would recommend looking at the patch on Hyunsu's fork (also included below)

This is just dropping the nvidia-nccl-cu12 line

diff --git python-package/pyproject.toml python-package/pyproject.toml
index 20d3f9974..953087ff4 100644
--- python-package/pyproject.toml
+++ python-package/pyproject.toml
@@ -30,7 +30,6 @@ classifiers = [
 dependencies = [
     "numpy",
     "scipy",
-    "nvidia-nccl-cu12 ; platform_system == 'Linux' and platform_machine != 'aarch64'",
 ]
 
 [project.urls]

@hcho3 hcho3 merged commit 7794d3d into dmlc:master Aug 28, 2024
31 of 32 checks passed
@hcho3 hcho3 deleted the fix_pip_tag branch August 28, 2024 01:11
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.

xgboost python package fails on pip check with pip 24.2 on osx-arm64
2 participants