summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2025-09-15 12:56:10 +0000
committerGitHub <noreply@github.com>2025-09-15 12:56:10 +0000
commit9d87ae7c6276ba32e3d8df53d94de427ed3afb8b (patch)
tree30d5cd81641c9b3005e357656955bf51b78cf41c /pkgs/development/python-modules
parent70925fbc6f5a356c4552a77a5f6e1a191ddab36a (diff)
parent496ba8feedc70526cecb27edb26bd7847086e6f8 (diff)
python313Packages.hydra-joblib-plugin: init at 1.3.2 (#423298)
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/hydra-joblib-launcher/default.nix55
1 files changed, 55 insertions, 0 deletions
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 ];
+ };
+}