Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Attempting to streamline the universal build on the Mac runner
Browse files Browse the repository at this point in the history
  • Loading branch information
MintoDA1 authored and MintoDA1 committed Sep 8, 2023
1 parent 40913f4 commit 298f1f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Build wheels
uses: pypa/cibuildwheel@v2.15.0
env:
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_MACOS: universal2
CIBW_ARCHS_LINUX: x86_64 aarch64
with:
package-dir: .
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ build-verbosity = 1

[tool.cibuildwheel.macos.environment]
ROOT_DIR="$(pwd)"
ARCH="$(uname -m)"
MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion)"
PREFIX="${ROOT_DIR}"
HOMEBREW_PREFIX="$(brew --prefix)"
Expand All @@ -71,9 +70,9 @@ LDFLAGS="-Wl,-rpath,${ROOT_DIR}/lib -Wl,-no_compact_unwind -L${PREFIX}/lib -L${
CPATH="/usr/local/include:${PREFIX}/include:${HOMEBREW_PREFIX}/include:${ROOT_DIR}/include"
CPPFLAGS="-isystem ${PREFIX}/include -isystem /usr/local/include"
LIBS="-lomp"
FCFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
FCFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -arch x86_64 -arch arm64"
FFFLAGS="${FCFLAGS}"
CFLAGS="${FCFLAGS} -Wno-deprecated-non-prototype"
CFLAGS="${FCFLAGS} -Wno-deprecated-non-prototype -arch x86_64 -arch arm64"
CXXFLAGS="${CFLAGS}"
HDF5_ROOT="${PREFIX}"
HDF5_LIBDIR="${HDF5_ROOT}/lib"
Expand All @@ -94,7 +93,7 @@ RANLIB="/usr/bin/ranlib"
[tool.cibuildwheel.macos]
before-all = [
"brew install coreutils",
"LIBS=\"\" FCFLAGS=\"${FCFLAGS} -arch x86_64 -arch arm64\" CFLAGS=\"${CFLAGS} -arch x86_64 -arch arm64\" FFLAGS=$FCFLAGS CXXFLAGS=$CFLAGS buildscripts/build_dependencies.sh -p ${PREFIX} -d ${TMPDIR}/swiftest.build -m ${MACOSX_DEPLOYMENT_TARGET}"
"LIBS=\"\" buildscripts/build_dependencies.sh -p ${PREFIX} -d ${TMPDIR}/swiftest.build -m ${MACOSX_DEPLOYMENT_TARGET}"
]

[tool.cibuildwheel.linux]
Expand Down

0 comments on commit 298f1f8

Please sign in to comment.