Skip to content

Commit

Permalink
Apple silicon support (#2504)
Browse files Browse the repository at this point in the history
* Apple sillicon support

* Update build_pip_pkg.sh

indent fix

* Other platforms fix.
  • Loading branch information
tetsuyasu committed Jul 7, 2021
1 parent 01b82a7 commit 9918fe0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions build_deps/build_pip_pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,21 @@ function main() {

BUILD_CMD="setup.py bdist_wheel --platlib-patch"
if is_macos; then
BUILD_CMD="${BUILD_CMD} --plat-name macosx_10_13_x86_64"
if [[ x"$(arch)" == x"arm64" ]]; then
BUILD_CMD="${BUILD_CMD} --plat-name macosx_11_0_arm64"
else
BUILD_CMD="${BUILD_CMD} --plat-name macosx_10_13_x86_64"
fi
PYTHON=python3
else
PYTHON=python
fi

if [[ -z ${NIGHTLY_FLAG} ]]; then
# Windows has issues with locking library files for deletion so do not fail here
python ${BUILD_CMD} || true
$PYTHON ${BUILD_CMD} || true
else
python ${BUILD_CMD} ${NIGHTLY_FLAG} || true
$PYTHON ${BUILD_CMD} ${NIGHTLY_FLAG} || true
fi

cp dist/*.whl "${DEST}"
Expand All @@ -93,4 +100,4 @@ function main() {
echo $(date) : "=== Output wheel file is in: ${DEST}"
}

main "$@"
main "$@"

0 comments on commit 9918fe0

Please sign in to comment.