Skip to content

Commit

Permalink
Merge pull request #157 from kiyo-masui/fixwheels
Browse files Browse the repository at this point in the history
Fix the wheel build
  • Loading branch information
kiyo-masui authored Sep 25, 2024
2 parents f219f50 + a871211 commit a3e7314
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/install_hdf5.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -57,14 +58,15 @@ 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:
- uses: actions/checkout@v4

- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y libhdf5-serial-dev hdf5-tools pkg-config
- name: Install Python
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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",
]

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Order matters
setuptools>=0.7
Cython>=0.19
numpy>=1.6.1
numpy>=1.24
h5py>=2.4.0
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a3e7314

Please sign in to comment.