Skip to content

Commit 89a77e9

Browse files
committed
use cmake for everything, don't include plugins
1 parent 7574cc4 commit 89a77e9

File tree

1 file changed

+35
-27
lines changed

1 file changed

+35
-27
lines changed

config.sh

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
export NO_NET=1
55
# ncdump/ncgen not installed in wheel, so tst_cdl.py fails
66
export NO_CDL=1
7+
export NO_PLUGINS=1
78

89
# Compile libs for macOS 10.9 or later
910
export MACOSX_DEPLOYMENT_TARGET="10.9"
@@ -20,11 +21,11 @@ export BZIP2_VERSION="1.0.8"
2021
export BLOSC_VERSION="1.21.1"
2122

2223
# 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-
}
24+
#function build_wheel {
25+
# # Set default building method to pip
26+
# export NETCDF_PLUGIN_DIR=${BUILD_PREFIX}/lib/netcdf-plugins
27+
# wrap_wheel_builder build_pip_wheel $@
28+
#}
2829

2930
# add --verbose to pip
3031
function pip_opts {
@@ -116,34 +117,41 @@ function build_netcdf {
116117
# && make install \
117118
# && ls -l $HDF5_PLUGIN_PATH )
118119
# autotools build
119-
if [ -n "$IS_MACOS" ]; then
120-
#if [[ ! -z "IS_OSX" && "$PLAT" = "arm64" ]] && [[ "$CROSS_COMPILING" = "1" ]]; then
121-
if [[ "$PLAT" = "arm64" ]] && [[ "$CROSS_COMPILING" = "1" ]]; then
122-
(cd netcdf-c-${NETCDF_VERSION} \
123-
&& ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap \
124-
&& make -j4 \
125-
&& make install )
126-
else
127-
(cd netcdf-c-${NETCDF_VERSION} \
128-
&& export HDF5_PLUGIN_PATH=$BUILD_PREFIX/lib/netcdf-plugins \
129-
&& ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap --with-plugin-dir=$HDF5_PLUGIN_PATH \
130-
&& make -j4 \
131-
&& make install )
132-
fi
133-
else # use cmake for linux since autoconf fails for 4.9.0
134-
# && cmake ../ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} -DENABLE_NETCDF_4=ON -DENABLE_DAP=ON -DBUILD_SHARED_LIBS=ON -DPLUGIN_INSTALL_DIR=YES \
135-
# && export HDF5_PLUGIN_PATH=$BUILD_PREFIX/lib/netcdf-plugins \
136-
# && mkdir -p $HDF5_PLUGIN_PATH \
120+
#if [ -n "$IS_MACOS" ]; then
121+
# #if [[ ! -z "IS_OSX" && "$PLAT" = "arm64" ]] && [[ "$CROSS_COMPILING" = "1" ]]; then
122+
# if [[ "$PLAT" = "arm64" ]] && [[ "$CROSS_COMPILING" = "1" ]]; then
123+
# (cd netcdf-c-${NETCDF_VERSION} \
124+
# && ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap \
125+
# && make -j4 \
126+
# && make install )
127+
# else
128+
# (cd netcdf-c-${NETCDF_VERSION} \
129+
# && export HDF5_PLUGIN_PATH=$BUILD_PREFIX/lib/netcdf-plugins \
130+
# && ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap --with-plugin-dir=$HDF5_PLUGIN_PATH \
131+
# && make -j4 \
132+
# && make install )
133+
# fi
134+
#else # use cmake for linux since autoconf fails for 4.9.0
135+
#(cd netcdf-c-${NETCDF_VERSION} \
136+
# && curl https://raw.githubusercontent.com/MacPython/netcdf4-python-wheels/master/CMakeLists.txt.patch -o CMakeLists.txt.patch \
137+
# && patch -p0 < CMakeLists.txt.patch \
138+
# && mkdir build \
139+
# && cd build \
140+
# && export HDF5_PLUGIN_PATH=$BUILD_PREFIX/lib/netcdf-plugins \
141+
# && mkdir -p $HDF5_PLUGIN_PATH \
142+
# && cmake ../ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} -DENABLE_NETCDF_4=ON -DENABLE_DAP=ON -DBUILD_SHARED_LIBS=ON -DPLUGIN_INSTALL_DIR=YES \
143+
# && make -j4 \
144+
# && make install \
145+
# && ls -l $HDF5_PLUGIN_PATH )
137146
(cd netcdf-c-${NETCDF_VERSION} \
138147
&& curl https://raw.githubusercontent.com/MacPython/netcdf4-python-wheels/master/CMakeLists.txt.patch -o CMakeLists.txt.patch \
139148
&& patch -p0 < CMakeLists.txt.patch \
140149
&& mkdir build \
141150
&& cd build \
142-
&& cmake ../ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} -DENABLE_NETCDF_4=ON -DENABLE_DAP=ON -DBUILD_SHARED_LIBS=ON -DENABLE_PLUGIN_INSTALL=NO=YES \
151+
&& cmake ../ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} -DENABLE_NETCDF_4=ON -DENABLE_DAP=ON -DBUILD_SHARED_LIBS=ON -DENABLE_PLUGIN_INSTALL=NO \
143152
&& make -j4 \
144-
&& make install \
145-
&& ls -l $HDF5_PLUGIN_PATH )
146-
fi
153+
&& make install )
154+
#fi
147155
touch netcdf-stamp
148156
}
149157

0 commit comments

Comments
 (0)