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

Dmr/fix mac wheels #15015

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,9 @@ 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)
# DMR: surely this won't make it work?
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 Expand Up @@ -100,6 +102,13 @@ def main(wheel_file: str, dest_dir: str, archs: Optional[str]) -> None:
else:
subprocess.run(["auditwheel", "repair", "-w", dest_dir, wheel_file], check=True)

# DMR: INSPECT THE WHEEL NAUGHTY EVIL DEBUG
from pip._internal.models.wheel import Wheel
from pip._internal.utils.compatibility_tags import get_supported
w = Wheel(wheel_file)
tags = get_supported()
print(f"w={w} tags={tags} supported={w.supported(tags)}")


if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Tag wheel as abi3 and repair it.")
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ jobs:
- ${{ startsWith(github.ref, 'refs/pull/') }}

exclude:
# Don't build macos wheels on PR CI.
- is_pr: true
os: "macos-11"
# # Don't build macos wheels on PR CI.
# - is_pr: true
# os: "macos-11"
# Don't build aarch64 wheels on mac.
- os: "macos-11"
arch: aarch64
Expand Down Expand Up @@ -139,21 +139,22 @@ jobs:
if: matrix.arch == 'aarch64'
run: echo 'CIBW_ARCHS_LINUX=aarch64' >> $GITHUB_ENV

- name: Only build a single wheel on PR
if: startsWith(github.ref, 'refs/pull/')
run: echo "CIBW_BUILD="cp37-manylinux_${{ matrix.arch }}"" >> $GITHUB_ENV
# - name: Only build a single wheel on PR
# if: startsWith(github.ref, 'refs/pull/')
# run: echo "CIBW_BUILD="cp37-manylinux_${{ matrix.arch }}"" >> $GITHUB_ENV

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
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

- uses: actions/upload-artifact@v3
if: always()
with:
name: Wheel
path: ./wheelhouse/*.whl
Expand Down