Skip to content

add support for macos 11.0, arm64, universal2#319

Merged
brettcannon merged 11 commits into
pypa:masterfrom
lawrence-danna-apple:macos11
Nov 24, 2020
Merged

add support for macos 11.0, arm64, universal2#319
brettcannon merged 11 commits into
pypa:masterfrom
lawrence-danna-apple:macos11

Conversation

@lawrence-danna-apple

Copy link
Copy Markdown
Contributor

This updates packaging to know about Mac OS version 11.0, which supports both x86_64 and arm64 arches.

It will allow pip to install x86_64 wheels built for previous versions of Mac OS onto 11.0

see: #318
see: https://discuss.python.org/t/apple-silicon-and-packaging/4516
see: python/cpython#21246

@lawrence-danna-apple lawrence-danna-apple force-pushed the macos11 branch 4 times, most recently from 337da43 to 45588a0 Compare July 11, 2020 02:43
@brettcannon brettcannon self-requested a review July 15, 2020 18:15
@pradyunsg pradyunsg self-requested a review July 15, 2020 18:59
@lawrence-danna-apple lawrence-danna-apple changed the title add support for macos 11., arm64, universal2 add support for macos 11.0, arm64, universal2 Jul 16, 2020
@ned-deily

Copy link
Copy Markdown

I'm not able to add myself as a reviewer but please do not merge this yet. Over in cpython, Ronald and I are working on 11.0 (Big Sur) support including these patches submitted by Apple (thanks!) but we have more work to do first to make sure we are doing the right things across the active branches. We'll let you know when we have reviewed this and are ready to proceed. Thanks!

@brettcannon brettcannon marked this pull request as draft July 16, 2020 20:02
@brettcannon

Copy link
Copy Markdown
Member

I've made this PR a draft until @ned-deily or another core dev comes back and says upstream CPython is ready for Big Sur and thus we are able to test against upstream appropriately.

@pradyunsg

pradyunsg commented Oct 11, 2020

Copy link
Copy Markdown
Member

Looks like https://bugs.python.org/issue41100 is the CPython tracking issue but it hasn't had much activity over the past 2 months -- @ned-deily @lawrence-danna-apple is that issue the correct place to be looking for the rough status of the blockers for this PR?

@pradyunsg

Copy link
Copy Markdown
Member

Removed the requested reviews -- mostly since it's showing up in my "Reviews Requested" queue, and this isn't actionable at this time.

@ned-deily

Copy link
Copy Markdown

We will be moving forward on that PR soon.

@ronaldoussoren ronaldoussoren left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the PR looks good to me. The naming for the new set of architectures ("universal2") matches what we're doing in CPython.

@ned-deily ned-deily left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks like this is good to go now. Corresponding support in CPython should land soon (https://bugs.python.org/issue41100).

@lawrence-danna-apple

lawrence-danna-apple commented Oct 26, 2020

Copy link
Copy Markdown
Contributor Author

@brettcannon, cpython devs have approved, I've removed the "Draft" tag and marked it as ready to review again.

@lawrence-danna-apple lawrence-danna-apple marked this pull request as ready for review October 26, 2020 19:44
Comment thread packaging/tags.py Outdated

@ned-deily ned-deily left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM, thanks

@mayeut

mayeut commented Oct 26, 2020

Copy link
Copy Markdown
Member

Tests are now failing because of:

((11, 0), "riscv", ["riscv", "universal"]),

but universal shall not be returned for riscv (c.f. https://github.com/python/cpython/blob/v3.9.0/Lib/_osx_support.py#L482)

@pradyunsg

Copy link
Copy Markdown
Member

Thanks @mayeut for catching that! ^>^

@ronaldoussoren

Copy link
Copy Markdown
Contributor

Pinning the minor to 0 is not really necessary, as you know there are ABI changes between releases of macOS (that is, some variant of macOS 11.x will introduce a new API).

@fxcoudert

Copy link
Copy Markdown

@lawrence-danna-apple it feels there should be a coordinated discussion about this, indeed. See pypa/wheel#385

@fxcoudert

Copy link
Copy Markdown

@ronaldoussoren there should not be a need to include minor version: there was no minor version before, and it worked fine, didn't it?

@lawrence-danna-apple

Copy link
Copy Markdown
Contributor Author

@fxcoudert good idea

@ronaldoussoren if we do not pin to zero, what should _mac_binary_formats do? It's not going to know today how many minor versions of Mac OS 11 there will be...

@ronaldoussoren

Copy link
Copy Markdown
Contributor

I don't mind pinning the value to zero, there's bound to be very few extensions that run into this and those would also have run into this with ABI changes between 10.X.0 and 10.X.Y.

BTW. Is there documentation on the value one should use for "MACOSX_DEPLOYMENT_TARGET"? "MACOSX_DEPLOYMENT_TARGET=11" appears to work.

Anyway, this ship has sailed. There are now wheels with "11.0" for the version on PyPI.

@fxcoudert

Copy link
Copy Markdown

@ronaldoussoren MACOSX_DEPLOYMENT_TARGET=11 is what one would typically use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.