Skip to content

Commit 9d87ae7

Browse files
python313Packages.hydra-joblib-plugin: init at 1.3.2 (#423298)
2 parents 70925fb + 496ba8f commit 9d87ae7

2 files changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
6+
# build-system
7+
setuptools,
8+
9+
# dependencies
10+
hydra-core,
11+
joblib,
12+
13+
# test
14+
pytestCheckHook,
15+
}:
16+
17+
buildPythonPackage rec {
18+
pname = "hydra-joblib-launcher";
19+
pyproject = true;
20+
21+
inherit (hydra-core) version src;
22+
23+
sourceRoot = "${src.name}/plugins/hydra_joblib_launcher";
24+
25+
# get rid of deprecated "read_version" dependency, no longer in Nixpkgs:
26+
postPatch = ''
27+
substituteInPlace pyproject.toml --replace-fail ', "read-version"' ""
28+
substituteInPlace setup.py \
29+
--replace-fail 'from read_version import read_version' "" \
30+
--replace-fail 'version=read_version("hydra_plugins/hydra_joblib_launcher", "__init__.py"),' 'version="${version}",'
31+
'';
32+
33+
build-system = [
34+
setuptools
35+
];
36+
37+
dependencies = [
38+
hydra-core
39+
joblib
40+
];
41+
42+
nativeCheckInputs = [
43+
pytestCheckHook
44+
];
45+
46+
# tries to write to source directory otherwise:
47+
pytestFlagsArray = [ "-p no:cacheprovider" ];
48+
49+
meta = {
50+
inherit (hydra-core.meta) changelog license;
51+
description = "Hydra launcher supporting parallel execution based on Joblib.Parallel";
52+
homepage = "https://hydra.cc/docs/plugins/joblib_launcher";
53+
maintainers = with lib.maintainers; [ bcdarwin ];
54+
};
55+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6848,6 +6848,8 @@ self: super: with self; {
68486848

68496849
hydra-core = callPackage ../development/python-modules/hydra-core { };
68506850

6851+
hydra-joblib-launcher = callPackage ../development/python-modules/hydra-joblib-launcher { };
6852+
68516853
hydrawiser = callPackage ../development/python-modules/hydrawiser { };
68526854

68536855
hydrogram = callPackage ../development/python-modules/hydrogram { };

0 commit comments

Comments
 (0)