diff --git a/.github/workflows/build-wheels-linux.yml b/.github/workflows/build-wheels-linux.yml index 35e3311..286cfd4 100644 --- a/.github/workflows/build-wheels-linux.yml +++ b/.github/workflows/build-wheels-linux.yml @@ -24,34 +24,34 @@ jobs: fail-fast: false matrix: - #python-version: [ "3.10"] - #os: [ubuntu-latest] - #platform: [x64] - python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10" ] + python-version: [ "3.10"] os: [ubuntu-latest] - platform: [x64, x32] - include: - - python-version: "3.6" - os: ubuntu-latest - platform: aarch64 - - python-version: "3.7" - os: ubuntu-latest - platform: aarch64 - - python-version: "3.8" - os: ubuntu-latest - platform: aarch64 - - python-version: "3.9" - os: ubuntu-latest - platform: aarch64 - - python-version: "3.10" - os: ubuntu-latest - platform: aarch64 + platform: [x64] + #python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10" ] + #os: [ubuntu-latest] + #platform: [x64, x32] + #include: + # - python-version: "3.6" + # os: ubuntu-latest + # platform: aarch64 + # - python-version: "3.7" + # os: ubuntu-latest + # platform: aarch64 + # - python-version: "3.8" + # os: ubuntu-latest + # platform: aarch64 + # - python-version: "3.9" + # os: ubuntu-latest + # platform: aarch64 + # - python-version: "3.10" + # os: ubuntu-latest + # platform: aarch64 env: REPO_DIR: netcdf4-python PKG_NAME: netcdf4-python - MB_ML_VER: 2014 - BUILD_COMMIT: v1.6.0rel + MB_ML_VER: _2_24 + BUILD_COMMIT: test_plugins UNICODE_WIDTH: 32 MB_PYTHON_VERSION: ${{ matrix.python-version }} TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }} diff --git a/.github/workflows/build-wheels-macosx.yml b/.github/workflows/build-wheels-macosx.yml index 9822e13..0bc6ce9 100644 --- a/.github/workflows/build-wheels-macosx.yml +++ b/.github/workflows/build-wheels-macosx.yml @@ -24,14 +24,15 @@ jobs: fail-fast: false matrix: - python-version: [ "3.8", "3.9","3.10" ] + #python-version: [ "3.8", "3.9","3.10" ] + python-version: [ "3.10" ] os: [macos-latest] platform: [x86_64] env: REPO_DIR: netcdf4-python PKG_NAME: netcdf4-python MB_ML_VER: 2014 - BUILD_COMMIT: v1.6.0rel + BUILD_COMMIT: test_plugins UNICODE_WIDTH: 32 PLAT: arm64 MB_PYTHON_VERSION: ${{ matrix.python-version }} @@ -101,7 +102,10 @@ jobs: clean_code $REPO_DIR $BUILD_COMMIT echo "------- BUILD WHEEL --------" build_wheel $REPO_DIR $PLAT - echo "------- INSTALL_RUN --------" + echo "check wheel" + ls -l ${{ github.workspace }}/wheelhouse + unzip -l ${{ github.workspace }}/wheelhouse/netCDF4*whl + #echo "------- INSTALL_RUN --------" #install_run $PLAT - name: Upload wheels to release uses: svenstaro/upload-release-action@v2 diff --git a/.github/workflows/build-wheels-macosx2.yml b/.github/workflows/build-wheels-macosx2.yml index 1609a48..ce73747 100644 --- a/.github/workflows/build-wheels-macosx2.yml +++ b/.github/workflows/build-wheels-macosx2.yml @@ -24,14 +24,15 @@ jobs: fail-fast: false matrix: - python-version: [ "3.8", "3.9","3.10" ] + #python-version: [ "3.8", "3.9","3.10" ] + python-version: [ "3.10" ] os: [macos-latest] platform: [x86_64] env: REPO_DIR: netcdf4-python PKG_NAME: netcdf4-python MB_ML_VER: 2014 - BUILD_COMMIT: v1.6.0rel + BUILD_COMMIT: test_plugins UNICODE_WIDTH: 32 PLAT: x86_64 MB_PYTHON_VERSION: ${{ matrix.python-version }} @@ -101,6 +102,9 @@ jobs: clean_code $REPO_DIR $BUILD_COMMIT echo "------- BUILD WHEEL --------" build_wheel $REPO_DIR $PLAT + echo "check wheel" + ls -l ${{ github.workspace }}/wheelhouse + unzip -l ${{ github.workspace }}/wheelhouse/netCDF4*whl echo "------- INSTALL_RUN --------" install_run $PLAT - name: Upload wheels to release diff --git a/config.sh b/config.sh index 1e336ed..461f91d 100644 --- a/config.sh +++ b/config.sh @@ -8,7 +8,7 @@ export NO_CDL=1 # uncomment build_wheel and enable plugin install in build_netcdf. # if plugins not include, plugins will not work with these wheels unless user sets # HDF5_PLUGIN_PATH to point to locally installed plugins. -export NO_PLUGINS=1 +#export NO_PLUGINS=1 # Compile libs for macOS 10.9 or later export MACOSX_DEPLOYMENT_TARGET="10.9" @@ -25,11 +25,11 @@ export BZIP2_VERSION="1.0.8" export BLOSC_VERSION="1.21.1" # custom version that sets NETCDF_PLUGIN_DIR env var -#function build_wheel { -# # Set default building method to pip -# export NETCDF_PLUGIN_DIR=${BUILD_PREFIX}/lib/netcdf-plugins -# wrap_wheel_builder build_pip_wheel $@ -#} +function build_wheel { + # Set default building method to pip + export NETCDF_PLUGIN_DIR=${BUILD_PREFIX}/lib/netcdf-plugins + wrap_wheel_builder build_pip_wheel $@ +} # add --verbose to pip function pip_opts { @@ -92,22 +92,26 @@ function build_zstd { local root_name=v${ZSTD_VERSION} local tar_name=zstd-${root_name}.tar.gz fetch_unpack https://github.com/facebook/zstd/releases/download/${root_name}/zstd-${ZSTD_VERSION}.tar.gz - #(cd zstd-${ZSTD_VERSION} \ - # && cd build \ - # && mkdir build \ - # && cd build \ - # && cmake ../cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \ - # && make \ - # && make install ) (cd zstd-${ZSTD_VERSION} \ + && cd build \ + && mkdir build \ + && cd build \ + && cmake ../cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \ && make \ - && make install prefix=$BUILD_PREFIX ) + && make install ) + #(cd zstd-${ZSTD_VERSION} \ + # && make \ + # && make install prefix=$BUILD_PREFIX ) touch zstd-stamp } function build_netcdf { if [ -e netcdf-stamp ]; then return; fi - fetch_unpack https://downloads.unidata.ucar.edu/netcdf-c/${NETCDF_VERSION}/netcdf-c-${NETCDF_VERSION}.tar.gz + #fetch_unpack https://downloads.unidata.ucar.edu/netcdf-c/${NETCDF_VERSION}/netcdf-c-${NETCDF_VERSION}.tar.gz + git clone https://github.com/Unidata/netcdf-c netcdf-c-${NETCDF_VERSION} + cd netcdf-c-${NETCDF_VERSION} + autoreconf -i + cd .. if [ -n "$IS_MACOS" ]; then if [[ "$PLAT" = "arm64" ]] && [[ "$CROSS_COMPILING" = "1" ]]; then # no plugins installed @@ -124,17 +128,23 @@ function build_netcdf { && make install ) fi else + # use autotools, plugins installed + (cd netcdf-c-${NETCDF_VERSION} \ + && export HDF5_PLUGIN_PATH=$BUILD_PREFIX/lib/netcdf-plugins \ + && ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap --with-plugin-dir=$HDF5_PLUGIN_PATH --disable-libxml2 \ + && make -j4 \ + && make install ) # use cmake for version 4.9.0 since autotools doesn't work # CMakeLists.txt patch needed for NETCDF_VERSION 4.9.0 # no plugins installed - (cd netcdf-c-${NETCDF_VERSION} \ - && curl https://raw.githubusercontent.com/MacPython/netcdf4-python-wheels/master/CMakeLists.txt.patch -o CMakeLists.txt.patch \ - && patch -p0 < CMakeLists.txt.patch \ - && mkdir build \ - && cd build \ - && cmake ../ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} -DENABLE_NETCDF_4=ON -DENABLE_DAP=ON -DBUILD_SHARED_LIBS=ON -DENABLE_PLUGIN_INSTALL=NO \ - && make -j4 \ - && make install ) + #(cd netcdf-c-${NETCDF_VERSION} \ + # && curl https://raw.githubusercontent.com/MacPython/netcdf4-python-wheels/master/CMakeLists.txt.patch -o CMakeLists.txt.patch \ + # && patch -p0 < CMakeLists.txt.patch \ + # && mkdir build \ + # && cd build \ + # && cmake ../ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} -DENABLE_NETCDF_4=ON -DENABLE_DAP=ON -DBUILD_SHARED_LIBS=ON -DENABLE_PLUGIN_INSTALL=NO \ + # && make -j4 \ + # && make install ) # plugins installed #(cd netcdf-c-${NETCDF_VERSION} \ # && curl https://raw.githubusercontent.com/MacPython/netcdf4-python-wheels/master/CMakeLists.txt.patch -o CMakeLists.txt.patch \ diff --git a/netcdf4-python b/netcdf4-python index f479c12..c6d29ec 160000 --- a/netcdf4-python +++ b/netcdf4-python @@ -1 +1 @@ -Subproject commit f479c122ee581a86c153a0a0ab79b331a4e79849 +Subproject commit c6d29ec96f8e089eb3b384546f8ea497e8d2f310