about summary refs log tree commit diff
path: root/pkgs/development/python-modules/python-daemon/default.nix
blob: 9df9bf8a593b22eabef5084a415d77d0e4d3fb21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{ lib
, buildPythonPackage
, fetchPypi
, docutils
, lockfile
, mock
, pytest_4
, testscenarios
, testtools
, twine
}:

buildPythonPackage rec {
  pname = "python-daemon";
  version = "2.3.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "bda993f1623b1197699716d68d983bb580043cf2b8a66a01274d9b8297b0aeaf";
  };

  nativeBuildInputs = [
    twine
  ];

  propagatedBuildInputs = [
    docutils
    lockfile
  ];

  checkInputs = [
    pytest_4
    mock
    testscenarios
    testtools
  ];

  # tests disabled due to incompatibilities with testtools>=2.5.0
  checkPhase = ''
    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
  '';

  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/";
    license = with licenses; [
      gpl3Plus
      asl20
    ];
    maintainers = with maintainers; [ ];
  };
}