Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / blosc2 / default.nix
blobefaec4ead71359486ea6fb5fa4bc192d73575e5c
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
5 # build-system
6 , cmake
7 , cython
8 , ninja
9 , oldest-supported-numpy
10 , pkg-config
11 , scikit-build
12 , setuptools
13 , wheel
15 # c library
16 , c-blosc2
18 # propagates
19 , msgpack
20 , ndindex
21 , numpy
22 , py-cpuinfo
23 , rich
25 # tests
26 , psutil
27 , pytestCheckHook
28 , torch
31 buildPythonPackage rec {
32   pname = "blosc2";
33   version = "2.5.1";
34   pyproject = true;
36   src = fetchFromGitHub {
37     owner = "Blosc";
38     repo = "python-blosc2";
39     rev = "refs/tags/v${version}";
40     hash = "sha256-yBgnNJU1q+FktIkpQn74LuRP19Ta/fNC60Z8TxzlWPk=";
41   };
43   postPatch = ''
44     substituteInPlace requirements-runtime.txt \
45       --replace "pytest" ""
46   '';
48   nativeBuildInputs = [
49     cmake
50     cython
51     ninja
52     oldest-supported-numpy
53     pkg-config
54     scikit-build
55     setuptools
56     wheel
57   ];
59   buildInputs = [ c-blosc2 ];
61   dontUseCmakeConfigure = true;
62   env.CMAKE_ARGS = "-DUSE_SYSTEM_BLOSC2:BOOL=YES";
64   propagatedBuildInputs = [
65     msgpack
66     ndindex
67     numpy
68     py-cpuinfo
69     rich
70   ];
72   nativeCheckInputs = [
73     psutil
74     pytestCheckHook
75     torch
76   ];
78   passthru.c-blosc2 = c-blosc2;
80   meta = with lib; {
81     description = "Python wrapper for the extremely fast Blosc2 compression library";
82     homepage = "https://github.com/Blosc/python-blosc2";
83     changelog = "https://github.com/Blosc/python-blosc2/releases/tag/v${version}";
84     license = licenses.bsd3;
85     maintainers = with maintainers; [ ris ];
86   };