1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 setuptools,
7 numpy,
8 h5py,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "h5io";
14 version = "0.2.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "h5io";
21 repo = "h5io";
22 rev = "refs/tags/h5io-${version}";
23 hash = "sha256-3mrHIkfaXq06mMzUwudRO81DWTk0TO/e15IQA5fxxNc=";
24 };
25
26 postPatch = ''
27 substituteInPlace pyproject.toml \
28 --replace "--cov-report=" "" \
29 --replace "--cov-branch" "" \
30 --replace "--cov=h5io" ""
31 '';
32
33 nativeBuildInputs = [ setuptools ];
34
35 propagatedBuildInputs = [
36 numpy
37 h5py
38 ];
39
40 nativeCheckInputs = [ pytestCheckHook ];
41
42 pythonImportsCheck = [ "h5io" ];
43
44 meta = with lib; {
45 description = "Read and write simple Python objects using HDF5";
46 homepage = "https://github.com/h5io/h5io";
47 changelog = "https://github.com/h5io/h5io/releases/tag/${src.rev}";
48 license = licenses.bsd3;
49 maintainers = with maintainers; [ mbalatsko ];
50 };
51}