Skip to content

Commit c68e0fd

Browse files
committed
fix: hdf5 p
1 parent aa41490 commit c68e0fd

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/check.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- uses: actions/checkout@v4
31+
- uses: actions/setup-python@v5
32+
with:
33+
python-version: "3.12"
34+
- run: pip install numpy h5py
3135
- name: Rust tests
3236
run: cargo test --features all-formats
3337

tests/hdf5_tests.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@ fn fixture(name: &str) -> PathBuf {
1717
if !dir.join("contiguous_simple.h5").exists() {
1818
std::fs::create_dir_all(&dir).unwrap();
1919
let script = manifest.join("tests").join("generate_hdf5_fixtures.py");
20-
let python = manifest.join(".venv").join("bin").join("python");
20+
let venv_python = manifest.join(".venv").join("bin").join("python");
21+
let python = if venv_python.exists() {
22+
venv_python
23+
} else {
24+
PathBuf::from("python3")
25+
};
2126
let status = std::process::Command::new(&python)
2227
.arg(&script)
2328
.arg(&dir)
2429
.status()
25-
.expect("Failed to run h5py fixture generator");
30+
.expect("Failed to run h5py fixture generator (need python3 with h5py)");
2631
assert!(status.success(), "h5py fixture generator failed");
2732
}
2833
});

0 commit comments

Comments
 (0)