4
4
export NO_NET=1
5
5
# ncdump/ncgen not installed in wheel, so tst_cdl.py fails
6
6
export NO_CDL=1
7
+ # to include plugins, comment out next line and
8
+ # uncomment build_wheel and enable plugin install in build_netcdf.
9
+ # if plugins not include, plugins will not work with these wheels unless user sets
10
+ # HDF5_PLUGIN_PATH to point to locally installed plugins.
7
11
export NO_PLUGINS=1
8
12
9
13
# Compile libs for macOS 10.9 or later
@@ -88,23 +92,46 @@ function build_zstd {
88
92
local root_name=v${ZSTD_VERSION}
89
93
local tar_name=zstd-${root_name} .tar.gz
90
94
fetch_unpack https://github.com/facebook/zstd/releases/download/${root_name} /zstd-${ZSTD_VERSION} .tar.gz
91
- (cd zstd-${ZSTD_VERSION} \
92
- && cd build \
93
- && mkdir build \
94
- && cd build \
95
- && cmake ../cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \
96
- && make \
97
- && make install )
98
95
# (cd zstd-${ZSTD_VERSION} \
96
+ # && cd build \
97
+ # && mkdir build \
98
+ # && cd build \
99
+ # && cmake ../cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \
99
100
# && make \
100
- # && make install prefix=$BUILD_PREFIX )
101
+ # && make install )
102
+ (cd zstd-${ZSTD_VERSION} \
103
+ && make \
104
+ && make install prefix=$BUILD_PREFIX )
101
105
touch zstd-stamp
102
106
}
103
107
104
108
function build_netcdf {
105
109
if [ -e netcdf-stamp ]; then return ; fi
106
110
fetch_unpack https://downloads.unidata.ucar.edu/netcdf-c/${NETCDF_VERSION} /netcdf-c-${NETCDF_VERSION} .tar.gz
107
- # cmake build
111
+ # use autotools
112
+ # no plugins installed
113
+ # (cd netcdf-c-${NETCDF_VERSION} \
114
+ # && ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap \
115
+ # && make -j4 \
116
+ # && make install )
117
+ # plugins installed
118
+ # (cd netcdf-c-${NETCDF_VERSION} \
119
+ # && export HDF5_PLUGIN_PATH=$BUILD_PREFIX/lib/netcdf-plugins \
120
+ # && ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap --with-plugin-dir=$HDF5_PLUGIN_PATH \
121
+ # && make -j4 \
122
+ # && make install )
123
+ # use cmake
124
+ # CMakeLists.txt patch needed for NETCDF_VERSION 4.9.0
125
+ # no plugins installed
126
+ (cd netcdf-c-${NETCDF_VERSION} \
127
+ && curl https://raw.githubusercontent.com/MacPython/netcdf4-python-wheels/master/CMakeLists.txt.patch -o CMakeLists.txt.patch \
128
+ && patch -p0 < CMakeLists.txt.patch \
129
+ && mkdir build \
130
+ && cd build \
131
+ && cmake ../ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} -DENABLE_NETCDF_4=ON -DENABLE_DAP=ON -DBUILD_SHARED_LIBS=ON -DENABLE_PLUGIN_INSTALL=NO \
132
+ && make -j4 \
133
+ && make install )
134
+ # plugins installed
108
135
# (cd netcdf-c-${NETCDF_VERSION} \
109
136
# && curl https://raw.githubusercontent.com/MacPython/netcdf4-python-wheels/master/CMakeLists.txt.patch -o CMakeLists.txt.patch \
110
137
# && patch -p0 < CMakeLists.txt.patch \
@@ -116,42 +143,6 @@ function build_netcdf {
116
143
# && make -j4 \
117
144
# && make install \
118
145
# && ls -l $HDF5_PLUGIN_PATH )
119
- # autotools build
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 )
146
- (cd netcdf-c-${NETCDF_VERSION} \
147
- && curl https://raw.githubusercontent.com/MacPython/netcdf4-python-wheels/master/CMakeLists.txt.patch -o CMakeLists.txt.patch \
148
- && patch -p0 < CMakeLists.txt.patch \
149
- && mkdir build \
150
- && cd build \
151
- && cmake ../ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} -DENABLE_NETCDF_4=ON -DENABLE_DAP=ON -DBUILD_SHARED_LIBS=ON -DENABLE_PLUGIN_INSTALL=NO \
152
- && make -j4 \
153
- && make install )
154
- # fi
155
146
touch netcdf-stamp
156
147
}
157
148
0 commit comments