Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test plugin install #22

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions .github/workflows/build-wheels-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/build-wheels-macosx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/build-wheels-macosx2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
56 changes: 33 additions & 23 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 {
Expand Down Expand Up @@ -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
Expand All @@ -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 \
Expand Down