From 1066614dd149f03cf4a05babdb1a930437df6463 Mon Sep 17 00:00:00 2001 From: Kiyoshi Masui Date: Tue, 24 Sep 2024 10:56:39 -0400 Subject: [PATCH 1/5] test and build on all supported version of python. --- .github/workflows/main.yml | 2 +- .github/workflows/wheels.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce9a177..05b25ae 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - python-version: ["3.9", "3.10", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 219870f..0166f20 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -57,7 +57,7 @@ jobs: name: Build source distribution strategy: matrix: - python-version: ["3.9"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] runs-on: ubuntu-latest steps: @@ -65,6 +65,7 @@ jobs: - name: Install apt dependencies run: | + sudo apt-get update sudo apt-get install -y libhdf5-serial-dev hdf5-tools pkg-config - name: Install Python From 2becd62479642ed87a0a1d286cfd6f52b3ced8bd Mon Sep 17 00:00:00 2001 From: Liam Gray Date: Tue, 24 Sep 2024 13:30:47 -0700 Subject: [PATCH 2/5] fix(wheels): require valid minimum supported python for cibuildwheel --- .github/workflows/wheels.yml | 3 ++- setup.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 0166f20..62d3f60 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -45,7 +45,8 @@ jobs: # .github/workflows/install_hdf5.sh 1.8.11 # Run units tests but disable test_h5plugin.py CIBW_TEST_COMMAND: pytest {package}/tests - # The Github runners for macOS don't support AVX2 instructions and so the tests will fail with SIGILL, so skip them + # The Github runners for macOS don't support AVX2 + # instructions and so the tests will fail with SIGILL, so skip them CIBW_TEST_SKIP: "*macosx*" # Package wheels and host on CI diff --git a/setup.py b/setup.py index 0cd5575..c5095bf 100644 --- a/setup.py +++ b/setup.py @@ -429,6 +429,7 @@ def build_extensions(self): cmdclass={"build_ext": build_ext, "install": install, "develop": develop}, setup_requires=setup_requires, install_requires=requires, + python_requires=">=3.9", # extras_require={'H5': ["h5py"]}, package_data={"": ["data/*"]}, # metadata for upload to PyPI From 7ed11524e7ad2ca9de0b97df15f5831858b32a9f Mon Sep 17 00:00:00 2001 From: Liam Gray Date: Tue, 24 Sep 2024 13:33:28 -0700 Subject: [PATCH 3/5] build: update minimum supported numpy and build with numpy 2.0 compatibility Numpy 1.24 is the current oldest supported numpy version. Building against numpy 2.0.0rc1 will support numpy >= 1.21 --- pyproject.toml | 4 ++-- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 60006e8..a44bcd3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ # Include dependencies when building wheels on cibuildwheel [build-system] requires = [ - "setuptools>=0.7", + "setuptools", "Cython>=0.19", - "numpy>=1.6.1", + "numpy>=2.0.0rc1", "h5py>=2.4.0", ] diff --git a/requirements.txt b/requirements.txt index 34c51ec..67294ff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # Order matters setuptools>=0.7 Cython>=0.19 -numpy>=1.6.1 +numpy>=1.24 h5py>=2.4.0 From b0e32ea57c48744668b7cc88bc3721c0fbaedbc2 Mon Sep 17 00:00:00 2001 From: Liam Gray Date: Tue, 24 Sep 2024 14:06:31 -0700 Subject: [PATCH 4/5] fix(wheels): hdf5 does not have a 1.14.4 distribution --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 62d3f60..5dcfdc8 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - hdf5: ["1.10.7", "1.14.4"] + hdf5: ["1.10.7", "1.14.4-3"] steps: # Checkout bitshuffle From a8712118f221e5359550e8af67809a902e021bfa Mon Sep 17 00:00:00 2001 From: Liam Gray Date: Tue, 24 Sep 2024 14:26:41 -0700 Subject: [PATCH 5/5] fix(install_hdf5): handle patch version in tar download --- .github/workflows/install_hdf5.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/install_hdf5.sh b/.github/workflows/install_hdf5.sh index 58b2bdb..13a99e2 100644 --- a/.github/workflows/install_hdf5.sh +++ b/.github/workflows/install_hdf5.sh @@ -1,9 +1,13 @@ -HDF5_VERSION=$1 +HDF5_DISTRIBUTION=$1 +# Extract the patch number +IFS='-' read -ra ADDR <<< "$HDF5_DISTRIBUTION" -# Download and install HDF5 $HDF5_VERSION from source for building wheels -curl https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VERSION%.*}/hdf5-$HDF5_VERSION/src/hdf5-$HDF5_VERSION.tar.gz -O -s -tar -xzf hdf5-$HDF5_VERSION.tar.gz -cd hdf5-$HDF5_VERSION +HDF5_VERSION=${ADDR[0]} + +# Download and install HDF5 $HDF5_DISTRIBUTION from source for building wheels +curl https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VERSION%.*}/hdf5-$HDF5_VERSION/src/hdf5-$HDF5_DISTRIBUTION.tar.gz -O -s +tar -xzf hdf5-$HDF5_DISTRIBUTION.tar.gz +cd hdf5-$HDF5_DISTRIBUTION ./configure --prefix=/usr/local make -j 2 make install