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

xgboost python package fails on pip check with pip 24.2 on osx-arm64 #10705

Closed
lorepirri opened this issue Aug 14, 2024 · 1 comment · Fixed by #10755
Closed

xgboost python package fails on pip check with pip 24.2 on osx-arm64 #10705

lorepirri opened this issue Aug 14, 2024 · 1 comment · Fixed by #10755

Comments

@lorepirri
Copy link

lorepirri commented Aug 14, 2024

pip 24.2 introduces a check on the tag within the wheel file.

xgboost has a hatch custom build hook that overrides the creation of the tag.

See: https://github.com/dmlc/xgboost/blob/v2.1.1/python-package/pyproject.toml#L48
Which should trigger:

return f"py3-none-{tag_platform}"

While building the version 2.1.1 of the package for the conda ecosystem, the resulting tag for the wheel file on osx-arm64 has the Tag: py3-none-macosx_11_1_arm64 but among the platform tags that are checked, there is no macosx_11_1_arm64 platform tag and the pip check fails with:

xgboost 2.1.1 is not supported on this platform

As far as I understand from the issues and PRs relative to this problem, the idea of pip for the Darwin platform, was to flatten the version to macosx_11_0 for all of the 11.x.

This seems to occur for Python version 3.12 but not on [3.8, 3.9, 3.10, 3.11].

Workaround

I disabled the custom build hook for osx-arm64 and, it seems to work fine.

Other information

  • Full WHEEL content for osx-arm64:

    Wheel-Version: 1.0
    Generator: hatchling 1.21.1
    Root-Is-Purelib: true
    Tag: py3-none-macosx_11_1_arm64
    
  • compatible tags for the platform:

    ['macosx_13_0_arm64', 'macosx_13_0_universal2', 'macosx_12_0_arm64', 'macosx_12_0_universal2', 'macosx_11_0_arm64', 'macosx_11_0_universal2', 'macosx_10_16_universal2', 'macosx_10_15_universal2', 'macosx_10_14_universal2', 'macosx_10_13_universal2', 'macosx_10_12_universal2', 'macosx_10_11_universal2', 'macosx_10_10_universal2', 'macosx_10_9_universal2', 'macosx_10_8_universal2', 'macosx_10_7_universal2', 'macosx_10_6_universal2', 'macosx_10_5_universal2', 'macosx_10_4_universal2']
    
  • pip check: https://github.com/pypa/pip/blob/e98cc5ce078d8c8afd6804ff4e61aa2b12d05715/src/pip/_internal/commands/check.py#L29-L34

Other references

See: pypa/packaging#435
See PR: AnacondaRecipes/xgboost-feedstock#20

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 a pull request may close this issue.

2 participants