Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
disable arm64 for mac until pypa/cibuildwheel#1416
Browse files Browse the repository at this point in the history
  • Loading branch information
horta committed Feb 23, 2023
1 parent 717b872 commit 9f99bd3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 38 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
path: dist/*.tar.gz

make_amd64_wheels:
make_wheels:
name: Make wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -31,31 +31,13 @@ jobs:

- name: Build wheels
run: pipx run cibuildwheel==2.12.0
env:
CIBW_ARCHS_MACOS: x86_64

- uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl

make_arm64_wheels:
name: Make wheels on macos-12 for arm64
runs-on: macos-12

steps:
- uses: actions/checkout@v3

- name: Build wheels
run: pipx run cibuildwheel==2.12.0
env:
CIBW_ARCHS_MACOS: arm64

- uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl

upload_all:
needs: [make_amd64_wheels, make_arm64_wheels, make_sdist]
needs: [make_wheels, make_sdist]
runs-on: ubuntu-22.04
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
Expand Down
14 changes: 0 additions & 14 deletions build_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import re
import shutil
import sys
import platform
import tarfile
import urllib.request
from dataclasses import dataclass
Expand Down Expand Up @@ -59,16 +58,6 @@ def rm(folder: Path, pattern: str):
filename.unlink()


def darwin_setup():
machine = platform.machine()
# Set by setuptools/cibuildwheels
archflags = os.environ.get("ARCHFLAGS")
if archflags is not None:
machine = ";".join(set(archflags.split()) & {"x86_64", "arm64"})

os.environ.setdefault("CMAKE_OSX_ARCHITECTURES", machine)


def build_ext(ext: Ext):
from cmake import CMAKE_BIN_DIR

Expand All @@ -89,9 +78,6 @@ def build_ext(ext: Ext):
with tarfile.open(TMP / tar_filename) as tf:
tf.extractall(TMP)

if sys.platform == "darwin":
darwin_setup()

cmake = [str(v) for v in Path(CMAKE_BIN_DIR).glob("cmake*")][0]
check_call([cmake, "-S", str(prj_dir), "-B", str(bld_dir)] + ext.cmake_opts)
n = os.cpu_count()
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "deciphon-core"
version = "0.2.2"
version = "0.2.3"
description = "Python package for biding the C implementation"
authors = ["Danilo Horta <[email protected]>"]
license = "MIT"
Expand All @@ -17,9 +17,9 @@ python = "^3.9"
cffi = "*"

[tool.poetry.group.dev.dependencies]
pytest = "^7.2.0"
pyright = "^1.1.288"
blx = "^0.1.8"
pytest = ">=7.2.0"
pyright = ">=1.1.288"
blx = ">=0.1.8"

[tool.poetry.build]
script = "build_ext.py"
Expand Down

0 comments on commit 9f99bd3

Please sign in to comment.