Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: enable building of arm64 macOS builds #1384

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 3 commits into from
Aug 27, 2024

Conversation

devbanu
Copy link
Contributor

@devbanu devbanu commented Jul 9, 2024

This PR is related to issues #1376 and #1380.

Enabling building for macOS arm64 builds is simple, because the newest macOS runners build in arm64 by default. Hence the addition of macos-latest to the matrix.

Also, since macos-11 runners are deprecated (see [1]), switched to macos-12 for the x86_64 builds.

Incidentally, it seems current Ubuntu runners don't include apt-get by default, so switched to using apt command.

So to summarize:

  • macos-12 runners will continue building macOS x86_64 builds
  • macos-latest runners will now build macOS arm64 builds

The new files look like this:

  zeroconf-0.132.2-cp310-cp310-macosx_14_0_arm64.whl          4,683 kB
  zeroconf-0.132.2-cp311-cp311-macosx_14_0_arm64.whl          4,685 kB
  zeroconf-0.132.2-cp312-cp312-macosx_14_0_arm64.whl          4,704 kB
  zeroconf-0.132.2-cp39-cp39-macosx_14_0_arm64.whl            1,727 kB
  zeroconf-0.132.2-pp310-pypy310_pp73-macosx_14_0_arm64.whl   4,428 kB
  zeroconf-0.132.2-pp38-pypy38_pp73-macosx_14_0_arm64.whl     4,423 kB
  zeroconf-0.132.2-pp39-pypy39_pp73-macosx_14_0_arm64.whl     4,425 kB

Note that it seems impossible to build cp38 for arm64 so excluded that configuration, while pp38 seems fine.

Unrelated, but it seem all wheels after cp39 include .c source code in them, making the wheels larger. This should probably addressed in a separate PR.

[1] https://github.blog/changelog/2024-05-20-actions-upcoming-changes-to-github-hosted-macos-runners/

Because of deprecation of macos-11 runners, switched to macos-12 for x86_64 builds.

Also switched from using `apt-get install` to `apt install` command for Ubuntu, since apt-get seem to not be available any more.
@devbanu
Copy link
Contributor Author

devbanu commented Aug 13, 2024

Just to clarify, is there anything else I need to do here?

It seems the failed check is about the format of the commit message. Any way to fix that without new PR?

@bdraco bdraco changed the title Enable building of arm64 macOS builds feat: enable building of arm64 macOS builds Aug 27, 2024
@bdraco
Copy link
Member

bdraco commented Aug 27, 2024

GitHub prevented pre-commit.ci from autofixing this pr due to autofixes to a workflow file

Please run pre-commit install
and pre-commit run --all-files locally

@bdraco bdraco merged commit 0df2ce0 into python-zeroconf:master Aug 27, 2024
29 of 30 checks passed
@bdraco
Copy link
Member

bdraco commented Aug 27, 2024

Unrelated, but it seem all wheels after cp39 include .c source code in them, making the wheels larger. This should probably addressed in a separate PR.

@devbanu

setup_kwargs["exclude_package_data"] = {pkg: ["*.c"] for pkg in setup_kwargs["packages"]}

It looks like this stopped working on newer python. Any thoughts on a solution?

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.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.