biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / blosc2 / default.nix
blobdb948e8098bc212b85e73b267bf58df90a562cd3
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
6   # build-system
7   cmake,
8   cython,
9   ninja,
10   oldest-supported-numpy,
11   pkg-config,
12   scikit-build,
13   setuptools,
14   wheel,
16   # c library
17   c-blosc2,
19   # propagates
20   msgpack,
21   ndindex,
22   numpy,
23   py-cpuinfo,
24   rich,
26   # tests
27   psutil,
28   pytestCheckHook,
29   torch,
32 buildPythonPackage rec {
33   pname = "blosc2";
34   version = "2.5.1";
35   pyproject = true;
37   src = fetchFromGitHub {
38     owner = "Blosc";
39     repo = "python-blosc2";
40     rev = "refs/tags/v${version}";
41     hash = "sha256-yBgnNJU1q+FktIkpQn74LuRP19Ta/fNC60Z8TxzlWPk=";
42   };
44   postPatch = ''
45     substituteInPlace requirements-runtime.txt \
46       --replace "pytest" ""
47   '';
49   nativeBuildInputs = [
50     cmake
51     cython
52     ninja
53     oldest-supported-numpy
54     pkg-config
55     scikit-build
56     setuptools
57     wheel
58   ];
60   buildInputs = [ c-blosc2 ];
62   dontUseCmakeConfigure = true;
63   env.CMAKE_ARGS = "-DUSE_SYSTEM_BLOSC2:BOOL=YES";
65   propagatedBuildInputs = [
66     msgpack
67     ndindex
68     numpy
69     py-cpuinfo
70     rich
71   ];
73   nativeCheckInputs = [
74     psutil
75     pytestCheckHook
76     torch
77   ];
79   passthru.c-blosc2 = c-blosc2;
81   meta = with lib; {
82     description = "Python wrapper for the extremely fast Blosc2 compression library";
83     homepage = "https://github.com/Blosc/python-blosc2";
84     changelog = "https://github.com/Blosc/python-blosc2/releases/tag/v${version}";
85     license = licenses.bsd3;
86     maintainers = with maintainers; [ ris ];
87   };