Skip to content

Commit 3100b96

Browse files
committed
Build universal2 macOS binary wheels
Because of the dual build required in macOS it's far easier to embed yajl into ijson rather than trying to build yajl separately for the two architectures. Signed-off-by: Rodrigo Tobar <[email protected]>
1 parent 3e7fc8e commit 3100b96

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/tools/install_yajl.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ install_unix() {
1010
OS="`uname -s`"
1111
echo "Building libyajl on $OS"
1212
case "$OS" in
13-
MSYS_*|MINGW_*)
14-
echo "No extra step required in Windows"
13+
MSYS_*|MINGW_*|Darwin)
14+
echo "No extra step required in Windows or macOS"
1515
;;
16-
Darwin|Linux)
16+
Linux)
1717
install_unix
1818
;;
1919
esac

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ env:
4747
- CIBW_BEFORE_ALL="bash -c 'cmake --help || yum install -y cmake; cd \"{project}\"; sh .github/tools/install_yajl.sh'"
4848
- CIBW_TEST_COMMAND="bash -c 'cd \"{project}\"; pytest -vv'"
4949
- CIBW_ENVIRONMENT_WINDOWS="IJSON_EMBED_YAJL=1"
50+
- CIBW_ENVIRONMENT_MACOS="IJSON_EMBED_YAJL=1"
51+
- CIBW_ARCHS_MACOS="x86_64 arm64 universal2"
52+
- CIBW_TEST_SKIP='*macosx_arm64 *universal2:arm64'
5053
- TWINE_USERNAME=__token__
5154

5255
_cibuildwheel: &cibuildwheel
@@ -99,7 +102,7 @@ jobs:
99102
- name: mac wheels build
100103
<<: *cibuildwheel
101104
os: osx
102-
osx_image: xcode10.2
105+
osx_image: xcode12.2
103106
language: shell
104107
# and a windows build
105108
- name: windows wheels build

0 commit comments

Comments
 (0)