From 496ba8feedc70526cecb27edb26bd7847086e6f8 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 7 Jul 2025 14:48:54 -0400 Subject: [PATCH] python313Packages.hydra-joblib-plugin: init at 1.3.2 --- .../hydra-joblib-launcher/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/hydra-joblib-launcher/default.nix diff --git a/pkgs/development/python-modules/hydra-joblib-launcher/default.nix b/pkgs/development/python-modules/hydra-joblib-launcher/default.nix new file mode 100644 index 000000000000..a110ecec96f0 --- /dev/null +++ b/pkgs/development/python-modules/hydra-joblib-launcher/default.nix @@ -0,0 +1,55 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + setuptools, + + # dependencies + hydra-core, + joblib, + + # test + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "hydra-joblib-launcher"; + pyproject = true; + + inherit (hydra-core) version src; + + sourceRoot = "${src.name}/plugins/hydra_joblib_launcher"; + + # get rid of deprecated "read_version" dependency, no longer in Nixpkgs: + postPatch = '' + substituteInPlace pyproject.toml --replace-fail ', "read-version"' "" + substituteInPlace setup.py \ + --replace-fail 'from read_version import read_version' "" \ + --replace-fail 'version=read_version("hydra_plugins/hydra_joblib_launcher", "__init__.py"),' 'version="${version}",' + ''; + + build-system = [ + setuptools + ]; + + dependencies = [ + hydra-core + joblib + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + # tries to write to source directory otherwise: + pytestFlagsArray = [ "-p no:cacheprovider" ]; + + meta = { + inherit (hydra-core.meta) changelog license; + description = "Hydra launcher supporting parallel execution based on Joblib.Parallel"; + homepage = "https://hydra.cc/docs/plugins/joblib_launcher"; + maintainers = with lib.maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 263a5fcd1ab3..ac756bbc1fc2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6713,6 +6713,8 @@ self: super: with self; { hydra-core = callPackage ../development/python-modules/hydra-core { }; + hydra-joblib-launcher = callPackage ../development/python-modules/hydra-joblib-launcher { }; + hydrawiser = callPackage ../development/python-modules/hydrawiser { }; hydrogram = callPackage ../development/python-modules/hydrogram { };