Skip to content

Commit

Permalink
Build universal2 macOS binary wheels
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
rtobar committed Apr 27, 2022
1 parent 3e7fc8e commit 3100b96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/tools/install_yajl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ install_unix() {
OS="`uname -s`"
echo "Building libyajl on $OS"
case "$OS" in
MSYS_*|MINGW_*)
echo "No extra step required in Windows"
MSYS_*|MINGW_*|Darwin)
echo "No extra step required in Windows or macOS"
;;
Darwin|Linux)
Linux)
install_unix
;;
esac
Expand Down
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ env:
- CIBW_BEFORE_ALL="bash -c 'cmake --help || yum install -y cmake; cd \"{project}\"; sh .github/tools/install_yajl.sh'"
- CIBW_TEST_COMMAND="bash -c 'cd \"{project}\"; pytest -vv'"
- CIBW_ENVIRONMENT_WINDOWS="IJSON_EMBED_YAJL=1"
- CIBW_ENVIRONMENT_MACOS="IJSON_EMBED_YAJL=1"
- CIBW_ARCHS_MACOS="x86_64 arm64 universal2"
- CIBW_TEST_SKIP='*macosx_arm64 *universal2:arm64'
- TWINE_USERNAME=__token__

_cibuildwheel: &cibuildwheel
Expand Down Expand Up @@ -99,7 +102,7 @@ jobs:
- name: mac wheels build
<<: *cibuildwheel
os: osx
osx_image: xcode10.2
osx_image: xcode12.2
language: shell
# and a windows build
- name: windows wheels build
Expand Down

0 comments on commit 3100b96

Please sign in to comment.