1{ lib
2, buildPythonPackage
3, fetchPypi
4, docutils
5, lockfile
6, pytestCheckHook
7, testscenarios
8, testtools
9, twine
10, python
11, pythonOlder
12, fetchpatch
13}:
14
15buildPythonPackage rec {
16 pname = "python-daemon";
17 version = "2.3.0";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchPypi {
23 inherit pname version;
24 sha256 = "bda993f1623b1197699716d68d983bb580043cf2b8a66a01274d9b8297b0aeaf";
25 };
26
27 nativeBuildInputs = [
28 twine
29 ];
30
31 propagatedBuildInputs = [
32 docutils
33 lockfile
34 ];
35
36 checkInputs = [
37 pytestCheckHook
38 testscenarios
39 testtools
40 ];
41
42 patches = [
43 # Should be fixed in the next release
44 (fetchpatch {
45 url = "https://src.fedoraproject.org/rpms/python-daemon/raw/rawhide/f/python-daemon-safe_hasattr.patch";
46 sha256 = "sha256-p5epAlM/sdel01oZkSI1vahUZYX8r90WCJuvBnfMaus=";
47 })
48 (fetchpatch {
49 url = "https://src.fedoraproject.org/rpms/python-daemon/raw/rawhide/f/tests-remove-duplicate-mocking.patch";
50 sha256 = "sha256-5b/dFR3Z8xaPw8AZU95apDZd4ZfmMQhAmavWkVaJog8=";
51 })
52 ];
53
54 disabledTestPaths = [
55 # requires removed distutils.command
56 "test_version.py"
57 ];
58
59 disabledTests = [
60 "begin_with_TestCase"
61 "changelog_TestCase"
62 "ChangeLogEntry"
63 "DaemonContext"
64 "file_descriptor"
65 "get_distribution_version_info_TestCase"
66 "InvalidFormatError_TestCase"
67 "make_year_range_TestCase"
68 "ModuleExceptions_TestCase"
69 "test_metaclass_not_called"
70 "test_passes_specified_object"
71 "test_returns_expected"
72 "value_TestCase"
73 "YearRange_TestCase"
74 ];
75
76 pythonImportsCheck = [
77 "daemon"
78 "daemon.daemon"
79 "daemon.pidfile"
80 "daemon.runner"
81 ];
82
83 meta = with lib; {
84 description = "Library to implement a well-behaved Unix daemon process";
85 homepage = "https://pagure.io/python-daemon/";
86 # See "Copying" section in https://pagure.io/python-daemon/blob/main/f/README
87 license = with licenses; [ gpl3Plus asl20 ];
88 maintainers = with maintainers; [ ];
89 };
90}