Skip to content

Commit

Permalink
ci, scripts: fix OSX Intel builds (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje authored Jun 11, 2024
1 parent 59fa2fd commit 1c2d005
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, windows-latest, macos-latest ]
os: [ ubuntu-20.04, windows-latest, macos-latest, macos-13 ]
python-version: ["3.11"]
steps:
- name: restore artifact
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate-pr-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, windows-latest, macos-latest ]
os: [ ubuntu-20.04, windows-latest, macos-latest, macos-13 ]
python-version: ["3.11", "3.12"]
steps:
- name: Checkout code
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, windows-latest, macos-latest ]
os: [ ubuntu-20.04, windows-latest, macos-latest, macos-13 ]
python-version: ["3.11", "3.12"]
steps:
- name: restore artifact
Expand Down
6 changes: 6 additions & 0 deletions scripts/fix-wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import sys
import pathlib
import sysconfig
import platform
from wheel.cli.tags import tags


Expand All @@ -18,6 +19,11 @@ def main(wheel_dir):
# PyPi rejects non-manylinux wheels. Change the tag according to PEP-513
if platform_tag.startswith("linux"):
platform_tag = platform_tag.replace("linux", "manylinux1")
if platform_tag.startswith("macosx"):
if platform.machine().lower() == "x86_64":
platform_tag = platform_tag.replace("universal2", "x86_64")
else:
platform_tag = platform_tag.replace("universal2", "arm64")
for f in pathlib.Path(wheel_dir).glob("**/*"):
if f.name.endswith("any.whl"):
tags(str(f.absolute()), None, None, platform_tag, None, True)
Expand Down

0 comments on commit 1c2d005

Please sign in to comment.