From 11d1976cc782667ed38237717b2328eca6a92bb9 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Wed, 3 Jan 2024 22:35:23 +0000 Subject: [PATCH] python3Packages.blosc2: 2.3.2 -> 2.5.1, use system c-blosc2 also don't need fetchSubmodules if we're not using the vendored c-blosc2 --- .../python-modules/blosc2/default.nix | 19 ++++++++++++++----- .../python-modules/tables/default.nix | 2 ++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/blosc2/default.nix b/pkgs/development/python-modules/blosc2/default.nix index 1bc55fbdcf0a..d960139a7d6e 100644 --- a/pkgs/development/python-modules/blosc2/default.nix +++ b/pkgs/development/python-modules/blosc2/default.nix @@ -7,10 +7,14 @@ , cython_3 , ninja , oldest-supported-numpy +, pkg-config , scikit-build , setuptools , wheel +# c library +, c-blosc2 + # propagates , msgpack , ndindex @@ -26,15 +30,14 @@ buildPythonPackage rec { pname = "blosc2"; - version = "2.3.2"; - format = "pyproject"; + version = "2.5.1"; + pyproject = true; src = fetchFromGitHub { owner = "Blosc"; repo = "python-blosc2"; rev = "refs/tags/v${version}"; - fetchSubmodules = true; - hash = "sha256-tRcyntJlmLPbqnX7nzdBQ/50uXy0fVLb2YGVOIwJjxU="; + hash = "sha256-yBgnNJU1q+FktIkpQn74LuRP19Ta/fNC60Z8TxzlWPk="; }; postPatch = '' @@ -47,12 +50,16 @@ buildPythonPackage rec { cython_3 ninja oldest-supported-numpy + pkg-config scikit-build setuptools wheel ]; + buildInputs = [ c-blosc2 ]; + dontUseCmakeConfigure = true; + env.CMAKE_ARGS = "-DUSE_SYSTEM_BLOSC2:BOOL=YES"; propagatedBuildInputs = [ msgpack @@ -68,11 +75,13 @@ buildPythonPackage rec { torch ]; + passthru.c-blosc2 = c-blosc2; + meta = with lib; { description = "Python wrapper for the extremely fast Blosc2 compression library"; homepage = "https://github.com/Blosc/python-blosc2"; changelog = "https://github.com/Blosc/python-blosc2/releases/tag/v${version}"; license = licenses.bsd3; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ ris ]; }; } diff --git a/pkgs/development/python-modules/tables/default.nix b/pkgs/development/python-modules/tables/default.nix index 70a6f86231e8..fd034b209133 100644 --- a/pkgs/development/python-modules/tables/default.nix +++ b/pkgs/development/python-modules/tables/default.nix @@ -41,6 +41,7 @@ buildPythonPackage rec { buildInputs = [ bzip2 c-blosc + blosc2.c-blosc2 hdf5 lzo ]; @@ -75,6 +76,7 @@ buildPythonPackage rec { "--lzo=${lib.getDev lzo}" "--bzip2=${lib.getDev bzip2}" "--blosc=${lib.getDev c-blosc}" + "--blosc2=${lib.getDev blosc2.c-blosc2}" ]; nativeCheckInputs = [