1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 fetchpatch,
6 pythonOlder,
7 h5py,
8 numpy,
9 dill,
10 astropy,
11 scipy,
12 pandas,
13 pytestCheckHook,
14 pytest-cov-stub,
15 setuptools,
16}:
17
18buildPythonPackage rec {
19 pname = "hickle";
20 version = "5.0.3";
21 pyproject = true;
22
23 disabled = pythonOlder "3.7";
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-An5RzK0nnRaBI6JEUl5shLrA22RgWzEbC9NJiRvgxT4=";
28 };
29
30 patches = [
31 # fixes support for numpy 2.x, the PR is not yet merged https://github.com/telegraphic/hickle/pull/186
32 # FIXME: Remove this patch when the numpy 2.x support arrives
33 (fetchpatch {
34 url = "https://github.com/cjwatson/hickle/commit/246d8e82c805e2e49ea0abd39abc9b2d800bde59.patch";
35 hash = "sha256-IEVw2K7S1nCkzgn9q0xghm4brfXcallNjzXpt2cRq1M=";
36 })
37 ];
38
39 build-system = [ setuptools ];
40
41 dependencies = [
42 dill
43 h5py
44 numpy
45 ];
46
47 nativeCheckInputs = [
48 astropy
49 pandas
50 pytestCheckHook
51 pytest-cov-stub
52 scipy
53 ];
54
55 pythonImportsCheck = [ "hickle" ];
56
57 meta = with lib; {
58 description = "Serialize Python data to HDF5";
59 homepage = "https://github.com/telegraphic/hickle";
60 changelog = "https://github.com/telegraphic/hickle/releases/tag/v${version}";
61 license = licenses.mit;
62 maintainers = with maintainers; [ bcdarwin ];
63 };
64}