summary refs log tree commit diff
path: root/pkgs/development/python-modules/eliot/default.nix
blob: 472834c5c7256fcfafd1db703949d99f9a5ccfff (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
{ lib, stdenv
, buildPythonPackage
, fetchPypi
, pythonOlder
, aiocontextvars
, boltons
, hypothesis
, pyrsistent
, pytest
, setuptools
, six
, testtools
, zope_interface
}:

buildPythonPackage rec {
  pname = "eliot";
  version = "1.13.0";
  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    sha256 = "5760194b308a7ab35514ae1b942d88e9f2359071556d82580383f09ca586fff7";
  };

  checkInputs = [
    hypothesis
    testtools
    pytest
   ];

  propagatedBuildInputs = [
    aiocontextvars
    boltons
    pyrsistent
    setuptools
    six
    zope_interface
  ];

  pythonImportsCheck = [ "eliot" ];

  # Tests run eliot-prettyprint in out/bin.
  # test_parse_stream is broken, skip it.
  checkPhase = ''
    export PATH=$out/bin:$PATH
    pytest -k 'not test_parse_stream'
  '';

  meta = with lib; {
    homepage = "https://eliot.readthedocs.io";
    description = "Logging library that tells you why it happened";
    license = licenses.asl20;
    maintainers = [ maintainers.dpausp ];
  };
}