2019-02-13 05:00:30 +01:00
|
|
|
{ lib, fetchFromGitHub, fetchpatch, buildPythonPackage, cython, slurm }:
|
2017-07-13 03:49:21 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-11-09 12:26:09 +01:00
|
|
|
pname = "pyslurm";
|
2018-10-27 22:16:07 +02:00
|
|
|
version = "18-08-3";
|
2017-07-13 03:49:21 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "pyslurm";
|
|
|
|
owner = "PySlurm";
|
2018-10-27 22:16:07 +02:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1rymx106xa99wd4n44s7jw0w41spg39y1ji4fgn01yk7wjfrdrwg";
|
2017-07-13 03:49:21 +02:00
|
|
|
};
|
|
|
|
|
2019-02-13 05:00:30 +01:00
|
|
|
# Needed for patch below to apply
|
|
|
|
prePatch = ''
|
|
|
|
sed -i -e '/__max_slurm_hex_version__ = "0x1208/c__max_slurm_hex_version__ = "0x120804"' setup.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Implements a less strict slurm version check
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/PySlurm/pyslurm/commit/d3703f2d58b5177d29092fe1aae1f7a96da61765.diff";
|
|
|
|
sha256 = "1s41z9bhzhplgg08p1llc3i8zw20r1479s04y0l1vx0ak51b6w0k";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2017-07-13 03:49:21 +02:00
|
|
|
buildInputs = [ cython slurm ];
|
|
|
|
setupPyBuildFlags = [ "--slurm-lib=${slurm}/lib" "--slurm-inc=${slurm.dev}/include" ];
|
|
|
|
|
2018-06-25 14:58:04 +02:00
|
|
|
# Test cases need /etc/slurm/slurm.conf and require a working slurm installation
|
|
|
|
doCheck = false;
|
|
|
|
|
2017-07-13 03:49:21 +02:00
|
|
|
meta = with lib; {
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://github.com/PySlurm/pyslurm;
|
2017-07-13 03:49:21 +02:00
|
|
|
description = "Python bindings to Slurm";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.veprbl ];
|
|
|
|
};
|
|
|
|
}
|