1{ lib
2, pythonOlder
3, fetchFromGitHub
4, fetchpatch
5, buildPythonPackage
6, cython
7, slurm
8}:
9
10buildPythonPackage rec {
11 pname = "pyslurm";
12 version = "23.2.2";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.6";
16
17 src = fetchFromGitHub {
18 repo = "pyslurm";
19 owner = "PySlurm";
20 rev = "refs/tags/v${version}";
21 hash = "sha256-M8seh5pkw2OTiDU4O96D0Lg3+FrlB2w4ehy53kSxyoU=";
22 };
23
24 patches = [ (fetchpatch {
25 name = "remove-undeclared-KILL_JOB_ARRAY";
26 url = "https://github.com/PySlurm/pyslurm/commit/f7a7d8beb8ceb4e4c1b248bab2ebb995dcae77e2.patch";
27 hash = "sha256-kQLGiGzAhqP8Z6pObz9vdTRdITd12w7KuUDXsfyLIU8=";
28 })];
29
30 buildInputs = [ cython slurm ];
31
32 setupPyBuildFlags = [ "--slurm-lib=${lib.getLib slurm}/lib" "--slurm-inc=${lib.getDev slurm}/include" ];
33
34 # Test cases need /etc/slurm/slurm.conf and require a working slurm installation
35 doCheck = false;
36
37 meta = with lib; {
38 homepage = "https://github.com/PySlurm/pyslurm";
39 description = "Python bindings to Slurm";
40 license = licenses.gpl2;
41 maintainers = with maintainers; [ bhipple ];
42 platforms = platforms.linux;
43 };
44}