Skip to content

Commit 40f7e3c

Browse files
committed
create arm64, not universal
1 parent dd83212 commit 40f7e3c

File tree

2 files changed

+34
-38
lines changed

2 files changed

+34
-38
lines changed

.github/workflows/build-wheels-macosx.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and build
22
# manylinux wheels for a variety of python versions and architectures.
33

4-
name: Build and upload macosx wheels (universal2 and arm64)
4+
name: Build and upload cross-compiled arm64 macosx wheels
55

66
on:
77
push:
@@ -33,7 +33,8 @@ jobs:
3333
MB_ML_VER: 2014
3434
BUILD_COMMIT: v1.6.0rel
3535
UNICODE_WIDTH: 32
36-
PLAT: universal2
36+
#PLAT: universal2
37+
PLAT: arm64
3738
MB_PYTHON_VERSION: ${{ matrix.python-version }}
3839
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
3940
TRAVIS_REPO_SLUG: ${{ github.repository }}
@@ -101,7 +102,6 @@ jobs:
101102
clean_code $REPO_DIR $BUILD_COMMIT
102103
echo "------- BUILD WHEEL --------"
103104
build_wheel $REPO_DIR $PLAT
104-
unzip -l wheelhouse/netCDF4*whl
105105
echo "------- INSTALL_RUN --------"
106106
install_run $PLAT
107107
- name: Upload wheels to release

config.sh

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ export BZIP2_VERSION="1.0.8"
2020
export BLOSC_VERSION="1.21.1"
2121

2222
# custom version that sets NETCDF_PLUGIN_DIR env var
23-
#function build_wheel {
24-
# # Set default building method to pip
25-
# export NETCDF_PLUGIN_DIR=${BUILD_PREFIX}/lib/netcdf-plugins
26-
# wrap_wheel_builder build_pip_wheel $@
27-
#}
23+
function build_wheel {
24+
# Set default building method to pip
25+
export NETCDF_PLUGIN_DIR=${BUILD_PREFIX}/lib/netcdf-plugins
26+
wrap_wheel_builder build_pip_wheel $@
27+
}
2828

2929
# add --verbose to pip
30-
#function pip_opts {
31-
# if [ -n "$MANYLINUX_URL" ]; then
32-
# echo "--verbose --find-links $MANYLINUX_URL"
33-
# else
34-
# echo "--verbose"
35-
# fi
36-
#}
30+
function pip_opts {
31+
if [ -n "$MANYLINUX_URL" ]; then
32+
echo "--verbose --find-links $MANYLINUX_URL"
33+
else
34+
echo "--verbose"
35+
fi
36+
}
3737

3838
function build_curl {
3939
if [ -e curl-stamp ]; then return; fi
@@ -107,19 +107,19 @@ function build_netcdf {
107107
# && make install \
108108
# && ls -l $HDF5_PLUGIN_PATH )
109109
# autotools build
110-
#if [[ ! -z "IS_OSX" && "$PLAT" = "arm64" ]] && [[ "$CROSS_COMPILING" = "1" ]]; then
111-
#unset NETCDF_PLUGIN_DIR
110+
if [[ ! -z "IS_OSX" && "$PLAT" = "arm64" ]] && [[ "$CROSS_COMPILING" = "1" ]]; then
111+
unset NETCDF_PLUGIN_DIR
112112
(cd netcdf-c-${NETCDF_VERSION} \
113113
&& ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap \
114114
&& make -j4 \
115115
&& make install )
116-
#else
117-
# (cd netcdf-c-${NETCDF_VERSION} \
118-
# && export HDF5_PLUGIN_PATH=$BUILD_PREFIX/lib/netcdf-plugins \
119-
# && ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap --with-plugin-dir=$HDF5_PLUGIN_PATH \
120-
# && make -j4 \
121-
# && make install )
122-
#fi
116+
else
117+
(cd netcdf-c-${NETCDF_VERSION} \
118+
&& export HDF5_PLUGIN_PATH=$BUILD_PREFIX/lib/netcdf-plugins \
119+
&& ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap --with-plugin-dir=$HDF5_PLUGIN_PATH \
120+
&& make -j4 \
121+
&& make install )
122+
fi
123123
touch netcdf-stamp
124124
}
125125

@@ -219,26 +219,22 @@ function build_blosc {
219219
function build_libs {
220220
echo "build_zlib"
221221
build_zlib
222-
#echo "build_lzo"
223-
#build_lzo
224-
#echo "build_lzf"
225-
#build_lzf
226-
#echo "build_zstd"
227-
#build_zstd
228-
#echo "build_bzip2"
229-
#build_bzip2
230-
#echo "build_blosc"
231-
#build_blosc
232-
# libaec is a drop-in replacement for szip
222+
echo "build_lzo"
223+
build_lzo
224+
echo "build_lzf"
225+
build_lzf
226+
echo "build_zstd"
227+
build_zstd
228+
echo "build_bzip2"
229+
build_bzip2
230+
echo "build_blosc"
231+
build_blosc
233232
echo "build_libaec"
234233
build_libaec
235234
echo "build_hdf5"
236235
build_hdf5
237236
echo "build_curl"
238237
build_curl
239-
if [ -z "$IS_OSX" ] && [ $MB_ML_VER == "1" ]; then
240-
export CFLAGS="-std=gnu99 -Wl,-strip-all"
241-
fi
242238
echo "build_netcdf"
243239
build_netcdf
244240
}

0 commit comments

Comments
 (0)