1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools-scm,
8
9 # dependencies
10 h5py,
11 numpy,
12
13 # tests
14 pytestCheckHook,
15 scipy,
16 tables,
17}:
18
19buildPythonPackage rec {
20 pname = "h5io";
21 version = "0.2.5";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "h5io";
26 repo = "h5io";
27 tag = "h5io-${version}";
28 hash = "sha256-ZkG9e7KtDvoRq9XCExYseE+Z7tMQTWcSiwsSrN5prdI=";
29 };
30
31 postPatch = ''
32 substituteInPlace pyproject.toml \
33 --replace "--cov-report=" "" \
34 --replace "--cov-branch" "" \
35 --replace "--cov=h5io" ""
36 '';
37
38 build-system = [ setuptools-scm ];
39
40 dependencies = [
41 h5py
42 numpy
43 ];
44
45 nativeCheckInputs = [
46 pytestCheckHook
47 scipy
48 tables
49 ];
50
51 disabledTests = [
52 # See https://github.com/h5io/h5io/issues/86
53 "test_state_with_pathlib"
54 ];
55
56 pythonImportsCheck = [ "h5io" ];
57
58 meta = {
59 description = "Read and write simple Python objects using HDF5";
60 homepage = "https://github.com/h5io/h5io";
61 changelog = "https://github.com/h5io/h5io/releases/tag/h5io-${version}";
62 license = lib.licenses.bsd3;
63 maintainers = with lib.maintainers; [ mbalatsko ];
64 };
65}