2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
2023-11-16 04:20:00 +00:00
|
|
|
, fetchpatch
|
2022-04-27 09:35:20 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, cython
|
|
|
|
, slurm
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyslurm";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "23.11.0";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "pyslurm";
|
|
|
|
owner = "PySlurm";
|
2022-09-11 15:47:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Qi0XftneKj7hdDiLY2hoRONRrPv49mfQlvlNkudH54Y=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
patches = [ (fetchpatch {
|
|
|
|
name = "remove-undeclared-KILL_JOB_ARRAY";
|
|
|
|
url = "https://github.com/PySlurm/pyslurm/commit/f7a7d8beb8ceb4e4c1b248bab2ebb995dcae77e2.patch";
|
|
|
|
hash = "sha256-kQLGiGzAhqP8Z6pObz9vdTRdITd12w7KuUDXsfyLIU8=";
|
|
|
|
})];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ cython slurm ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
setupPyBuildFlags = [ "--slurm-lib=${lib.getLib slurm}/lib" "--slurm-inc=${lib.getDev slurm}/include" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Test cases need /etc/slurm/slurm.conf and require a working slurm installation
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/PySlurm/pyslurm";
|
|
|
|
description = "Python bindings to Slurm";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ bhipple ];
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|