Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit d3464e1

Browse files
authored
update to hdf5 1.14 for windows, since h5py made the jump (#477)
* update to hdf5 1.14 for windows, since h5py made the jump
1 parent 89fcfe3 commit d3464e1

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed

.github/workflows/publish-sdist-wheels.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on: [pull_request, push]
44
env:
55
CIBW_BUILD_VERBOSITY: 3
66
CIBW_BUILD: 'cp*'
7-
CIBW_SKIP: 'cp35-* cp36-* *-manylinux_i686 *-musllinux_* *-win32 cp311-macosx_x86_64'
7+
CIBW_SKIP: 'cp35-* cp36-* cp37-* *-manylinux_i686 *-musllinux_* *-win32 cp311-macosx_x86_64'
88
CIBW_BEFORE_TEST: pip install -r {project}/tests/requirement_tests.txt
99
CIBW_TEST_COMMAND: pytest -s -v {project}/tests
10+
WINDOWS_HDF5: 1.14.2
1011

1112
jobs:
1213
build_wheels:
@@ -89,6 +90,24 @@ jobs:
8990
run: |
9091
python -m cibuildwheel --output-dir dist
9192
93+
- name: Cache HDF5 On Windows
94+
if: runner.os == 'Windows'
95+
id: cache-hdf5-windows
96+
uses: actions/cache@v3
97+
env:
98+
cache-name: cache-hdf5-windows
99+
with:
100+
path: C:\cache\hdf5\${{ env.WINDOWS_HDF5 }}
101+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.WINDOWS_HDF5 }}
102+
103+
- name: Fill Windows Cache
104+
if: runner.os == 'Windows' && steps.cache-hdf5-windows.outputs.cache-hit != 'true'
105+
continue-on-error: false
106+
shell: cmd
107+
run: |
108+
mkdir C:\cache\hdf5\${{ env.WINDOWS_HDF5 }}
109+
curl -L -o C:\cache\hdf5\${{ env.WINDOWS_HDF5 }}\hdf5.zip https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/hdf5-1.14.2/bin/windows/hdf5-1.14.2-Std-win10_64-vs16.zip
110+
92111
- name: Build wheels Windows
93112
if: runner.os == 'Windows'
94113
shell: cmd
@@ -99,13 +118,12 @@ jobs:
99118
# this has a partial table:
100119
# https://devblogs.microsoft.com/cppblog/side-by-side-minor-version-msvc-toolsets-in-visual-studio-2017/
101120
run: |
102-
curl -O https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/bin/hdf5-1.12.0-Std-win10_64-vs16.zip
103-
C:\windows\system32\tar.exe xf hdf5-1.12.0-Std-win10_64-vs16.zip
104-
start /wait msiexec /a "%cd%\hdf\HDF5-1.12.0-win64.msi" /qn TARGETDIR="c:\hdf5\"
121+
C:\windows\system32\tar.exe xf C:\cache\hdf5\${{ env.WINDOWS_HDF5 }}\hdf5.zip
122+
start /wait msiexec /a "%cd%\hdf\HDF5-${{ env.WINDOWS_HDF5 }}-win64.msi" /qn TARGETDIR="c:\hdf5\"
105123
106124
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.1
107125
108-
set HDF5_DIR=C:\hdf5\HDF_Group\HDF5\1.12.0\cmake
126+
set HDF5_DIR=C:\hdf5\HDF_Group\HDF5\${{ env.WINDOWS_HDF5 }}\cmake
109127
110128
python -m cibuildwheel --output-dir dist
111129
@@ -125,10 +143,10 @@ jobs:
125143
with:
126144
submodules: 'true'
127145

128-
- name: Set up Python 3.7
146+
- name: Set up Python 3.8
129147
uses: actions/setup-python@v4
130148
with:
131-
python-version: 3.7
149+
python-version: 3.8
132150

133151
- name: Build a source tarball
134152
run:

morphio/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# there cannot be a mismatch between version, when using windows,
77
# and MorphIO doesn't need to build hdf5
88
import h5py as _h5py
9-
if (1, 12) != _h5py.version.hdf5_version_tuple[:2]:
10-
raise RuntimeError(f'HDF5 library version mismatch. 1.12.x != {_h5py.version.hdf5_version}')
9+
if (1, 14) != _h5py.version.hdf5_version_tuple[:2]:
10+
raise RuntimeError(f'HDF5 library version mismatch. 1.14.x != {_h5py.version.hdf5_version}')
1111
del _h5py
1212

1313

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,5 @@ def build_extension(self, ext):
9797
setup_requires=[
9898
'setuptools_scm',
9999
],
100-
python_requires=">=3.7",
100+
python_requires=">=3.8",
101101
)

0 commit comments

Comments
 (0)