1{ lib
2, pythonOlder
3, fetchFromGitHub
4, buildPythonPackage
5, cython
6, slurm
7}:
8
9buildPythonPackage rec {
10 pname = "pyslurm";
11 version = "22.5.1";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.6";
15
16 src = fetchFromGitHub {
17 repo = "pyslurm";
18 owner = "PySlurm";
19 rev = "refs/tags/v${version}";
20 hash = "sha256-sPZELCxe2e7/gUmRxvP2aOwqsbaR/x+0grHwuDdx0Dg=";
21 };
22
23 buildInputs = [ cython slurm ];
24
25 setupPyBuildFlags = [ "--slurm-lib=${slurm}/lib" "--slurm-inc=${slurm.dev}/include" ];
26
27 # Test cases need /etc/slurm/slurm.conf and require a working slurm installation
28 doCheck = false;
29
30 meta = with lib; {
31 homepage = "https://github.com/PySlurm/pyslurm";
32 description = "Python bindings to Slurm";
33 license = licenses.gpl2;
34 maintainers = with maintainers; [ bhipple ];
35 platforms = platforms.linux;
36 };
37}