From 32a2f6fe6f9bfe0be84e126e712b56633eb21330 Mon Sep 17 00:00:00 2001 From: Fabian Affolter <mail@fabian-affolter.ch> Date: Thu, 2 Jun 2022 08:39:14 +0200 Subject: [PATCH] python310Packages.fastparquet: add optional dependency --- .../python-modules/fastparquet/default.nix | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/fastparquet/default.nix b/pkgs/development/python-modules/fastparquet/default.nix index 30aa6a2ab764..e11aac39f7e6 100644 --- a/pkgs/development/python-modules/fastparquet/default.nix +++ b/pkgs/development/python-modules/fastparquet/default.nix @@ -8,28 +8,50 @@ , cramjam , fsspec , thrift +, python-lzo , pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "fastparquet"; version = "0.8.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "dask"; repo = pname; rev = version; - sha256 = "05qb4nz87p9vnrdsyl25hdp5sj35lki64gjza5dahc89fwfdnsmd"; + hash = "sha256-rWrbHHcJMahaUV8+YuKkZUhdboNFUK9btjvdg74lCxc="; }; + propagatedBuildInputs = [ + cramjam + fsspec + numba + numpy + pandas + thrift + ]; + + passthru.optional-dependencies = { + lzo = [ + python-lzo + ]; + }; + + checkInputs = [ + pytestCheckHook + ]; + postPatch = '' substituteInPlace setup.py \ --replace "'pytest-runner'," "" \ --replace "oldest-supported-numpy" "numpy" ''; - propagatedBuildInputs = [ cramjam fsspec numba numpy pandas thrift ]; - checkInputs = [ pytestCheckHook ]; # Workaround https://github.com/NixOS/nixpkgs/issues/123561 preCheck = '' @@ -43,7 +65,9 @@ buildPythonPackage rec { rm "$fastparquet_test" ''; - pythonImportsCheck = [ "fastparquet" ]; + pythonImportsCheck = [ + "fastparquet" + ]; meta = with lib; { description = "A python implementation of the parquet format";