summary refs log tree commit diff
path: root/pkgs/development/python-modules/Logbook/default.nix
blob: fa05a7a6dffac9e5e42d1005c0620ad830f44964 (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
{ lib, buildPythonPackage, fetchPypi, isPy3k, pytest, mock, brotli }:

buildPythonPackage rec {
  pname = "Logbook";
  version = "1.5.3";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1s1gyfw621vid7qqvhddq6c3z2895ci4lq3g0r1swvpml2nm9x36";
  };

  checkInputs = [ pytest ] ++ lib.optionals (!isPy3k) [ mock ];

  propagatedBuildInputs = [ brotli ];

  checkPhase = ''
    find tests -name \*.pyc -delete
    py.test tests
  '';

  # Some of the tests use localhost networking.
  __darwinAllowLocalNetworking = true;

  meta = {
    homepage = "https://pythonhosted.org/Logbook/";
    description = "A logging replacement for Python";
    license = lib.licenses.bsd3;
  };
}