From 70f1e03e56df869c5c8442d6f091335d18cd61ee Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 30 Dec 2023 16:30:15 +0900 Subject: [PATCH] python311Packages.lightgbm: 4.1.0 -> 4.2.0 Changelog: https://github.com/microsoft/LightGBM/releases/tag/v4.2.0 --- .../python-modules/lightgbm/default.nix | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/lightgbm/default.nix b/pkgs/development/python-modules/lightgbm/default.nix index 54ca047acdd9..6c64228249e1 100644 --- a/pkgs/development/python-modules/lightgbm/default.nix +++ b/pkgs/development/python-modules/lightgbm/default.nix @@ -15,9 +15,15 @@ , llvmPackages , numpy , scipy -, scikit-learn , pythonOlder +# optionals +, cffi +, dask +, pandas +, pyarrow +, scikit-learn + # optionals: gpu , boost , ocl-icd @@ -32,14 +38,14 @@ assert cudaSupport -> gpuSupport != true; buildPythonPackage rec { pname = "lightgbm"; - version = "4.1.0"; - format = "pyproject"; + version = "4.2.0"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-vuWd0mmpOwk/LGENSmaDp+qHxj0+o1xiISPOLAILKrw="; + hash = "sha256-ik0FHfKrIhiZihb3cS6EPunpbYsJ/7/MGFM9oSfg2gI="; }; nativeBuildInputs = [ @@ -68,7 +74,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy scipy - scikit-learn ]; pypaBuildFlags = lib.optionals gpuSupport [ @@ -81,6 +86,25 @@ buildPythonPackage rec { export HOME=$(mktemp -d) ''; + passthru.optional-dependencies = { + arrow = [ + cffi + pyarrow + ]; + dask = [ + dask + pandas + ] ++ dask.optional-dependencies.array + ++ dask.optional-dependencies.dataframe + ++ dask.optional-dependencies.distributed; + pandas = [ + pandas + ]; + scikit-learn = [ + scikit-learn + ]; + }; + # The pypi package doesn't distribute the tests from the GitHub # repository. It contains c++ tests which don't seem to wired up to # `make check`.