Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Hacky fix to make mac wheels (#15019)
Browse files Browse the repository at this point in the history
* Skip testing PyPy wheels

One of the test builds on #15015 failed to install a pp38-* wheel
because it didn't have access to the openssl headers to build
`cryptography` from source. We don't run CI against PyPy so I'm going to
be a meanie and skip testing the wheels. (And I've no idea why 3.8 was
special in the first place, either.)

* Hack the name of the wheel so cibw can test it

I hate hate hate hate hate hate hate hate hate this

* Changelog

* Apply suggestions from code review

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>

---------

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
  • Loading branch information
David Robertson and clokep authored Feb 7, 2023
1 parent 4142dca commit 0c29f5f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .ci/scripts/auditwheel_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,16 @@ def cpython(wheel_file: str, name: str, version: Version, tag: Tag) -> str:

check_is_abi3_compatible(wheel_file)

abi3_tag = Tag(tag.interpreter, "abi3", tag.platform)
# HACK: it seems that some older versions of pip will consider a wheel marked
# as macosx_11_0 as incompatible with Big Sur. I haven't done the full archaeology
# here; there are some clues in
# https://github.com/pantsbuild/pants/pull/12857
# https://github.com/pypa/pip/issues/9138
# https://github.com/pypa/packaging/pull/319
# Empirically this seems to work, note that macOS 11 and 10.16 are the same,
# both versions are valid for backwards compatibility.
platform = tag.platform.replace("macosx_11_0", "macosx_10_16")
abi3_tag = Tag(tag.interpreter, "abi3", platform)

dirname = os.path.dirname(wheel_file)
new_wheel_file = os.path.join(
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
env:
# Skip testing for platforms which various libraries don't have wheels
# for, and so need extra build deps.
CIBW_TEST_SKIP: pp3{7,9}-* *i686* *musl*
CIBW_TEST_SKIP: pp3*-* *i686* *musl*
# Fix Rust OOM errors on emulated aarch64: https://github.com/rust-lang/cargo/issues/10583
CARGO_NET_GIT_FETCH_WITH_CLI: true
CIBW_ENVIRONMENT_PASS_LINUX: CARGO_NET_GIT_FETCH_WITH_CLI
Expand Down
1 change: 1 addition & 0 deletions changelog.d/15019.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix creation of wheels on macOS.

0 comments on commit 0c29f5f

Please sign in to comment.