Skip to content

BUG: ignore macOS minor version #161

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

Merged
merged 1 commit into from
Sep 30, 2022
Merged

BUG: ignore macOS minor version #161

merged 1 commit into from
Sep 30, 2022

Conversation

FFY00
Copy link
Member

@FFY00 FFY00 commented Sep 30, 2022

Fixes #160

@rgommers rgommers added the bug Something isn't working label Sep 30, 2022
Signed-off-by: Filipe Laíns <[email protected]>
@FFY00 FFY00 enabled auto-merge (rebase) September 30, 2022 15:38
Copy link
Contributor

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

I now tested this on macOS arm64, and it works correctly there. However, the logic is wrong for macOS 10.x - there we do want to preserve the major version, it should result in (e.g.) 10_13 and not 10_0.

So it should be something like:

parts[1] = platform.mac_ver()[0]
if parts[1] > '11':
    parts[1] = parts[1].split('.')[0]

I can't test this, as I don't have a 10.x machine available. But from reading the code, this case isn't handled.

@@ -51,7 +51,9 @@
platform_ = sysconfig.get_platform()
if platform.system() == 'Darwin':
parts = platform_.split('-')
parts[1] = platform.mac_ver()[0]
parts[1] = platform.mac_ver()[0].split('.')[0]
if parts[1] in ('11', '12'):
Copy link
Contributor

Choose a reason for hiding this comment

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

Make it > '11', to avoid this breaking as soon as macOS 13 comes out?

Copy link
Member Author

Choose a reason for hiding this comment

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

The idea is that packaging would have this fixed by then.

Copy link
Contributor

Choose a reason for hiding this comment

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

Even with that fix, it still needs to be 13.0 for any 13.x OS version in the absence of MACOSX_DEPLOYMENT_PLATFORM. The packaging fix is only for when MACOSX_DEPLOYMENT_PLATFORM is explicitly set.

@FFY00 FFY00 merged commit 25b8d28 into main Sep 30, 2022
@FFY00 FFY00 deleted the fix-160 branch September 30, 2022 16:21
@rgommers rgommers added this to the v0.9.1 milestone Sep 30, 2022
rgommers added a commit to rgommers/meson-python that referenced this pull request Oct 3, 2022
@rgommers rgommers modified the milestones: v0.9.1, v0.9.0 Oct 3, 2022
FFY00 pushed a commit to rgommers/meson-python that referenced this pull request Oct 4, 2022
This is a follow-up to mesonbuildgh-161

Signed-off-by: Filipe Laíns <[email protected]>
FFY00 pushed a commit to rgommers/meson-python that referenced this pull request Oct 4, 2022
This is a follow-up to mesonbuildgh-161

Signed-off-by: Filipe Laíns <[email protected]>
FFY00 pushed a commit that referenced this pull request Oct 4, 2022
This is a follow-up to gh-161

Signed-off-by: Filipe Laíns <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.9.0 release produces macOS wheel platform tag that cannot be installed on Homebrew Python
2 participants