2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-04-24 23:36:52 +00:00
|
|
|
, docutils
|
|
|
|
, lockfile
|
|
|
|
, mock
|
2020-06-18 07:06:33 +00:00
|
|
|
, pytest_4
|
2020-04-24 23:36:52 +00:00
|
|
|
, testscenarios
|
2021-09-18 10:52:07 +00:00
|
|
|
, testtools
|
2020-04-24 23:36:52 +00:00
|
|
|
, twine
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-daemon";
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "2.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-26 19:14:03 +00:00
|
|
|
sha256 = "bda993f1623b1197699716d68d983bb580043cf2b8a66a01274d9b8297b0aeaf";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
twine
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
docutils
|
|
|
|
lockfile
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest_4
|
|
|
|
mock
|
|
|
|
testscenarios
|
|
|
|
testtools
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
# tests disabled due to incompatibilities with testtools>=2.5.0
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
2021-09-18 10:52:07 +00:00
|
|
|
runHook preCheck
|
|
|
|
pytest -k ' \
|
|
|
|
not detaches_process_context and \
|
|
|
|
not standard_stream_file_descriptors and \
|
|
|
|
not test_module_has_attribute and \
|
|
|
|
not test_module_attribute_has_duck_type'
|
|
|
|
runHook postCheck
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"daemon"
|
|
|
|
"daemon.daemon"
|
|
|
|
"daemon.pidfile"
|
|
|
|
"daemon.runner"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library to implement a well-behaved Unix daemon process";
|
|
|
|
homepage = "https://pagure.io/python-daemon/";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = with licenses; [
|
|
|
|
gpl3Plus
|
|
|
|
asl20
|
|
|
|
];
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|