nixpkgs/pkgs/development/python-modules/structlog/default.nix

39 lines
733 B
Nix
Raw Normal View History

2017-12-30 13:25:04 +01:00
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
2017-12-30 13:25:04 +01:00
, pytest
, python-rapidjson
2017-12-30 13:25:04 +01:00
, pretend
, freezegun
, twisted
2017-12-30 13:25:04 +01:00
, simplejson
, six
, pythonAtLeast
2017-12-30 13:25:04 +01:00
}:
buildPythonPackage rec {
pname = "structlog";
2019-02-14 08:37:31 +01:00
version = "19.1.0";
2017-12-30 13:25:04 +01:00
src = fetchPypi {
inherit pname version;
2019-02-14 08:37:31 +01:00
sha256 = "5feae03167620824d3ae3e8915ea8589fc28d1ad6f3edf3cc90ed7c7cb33fab5";
2017-12-30 13:25:04 +01:00
};
checkInputs = [ pytest pretend freezegun simplejson twisted ]
++ lib.optionals (pythonAtLeast "3.6") [ python-rapidjson ];
propagatedBuildInputs = [ six ];
2017-12-30 13:25:04 +01:00
checkPhase = ''
# rm tests/test_twisted.py*
2017-12-30 13:25:04 +01:00
py.test
'';
meta = {
description = "Painless structural logging";
homepage = http://www.structlog.org/;
license = lib.licenses.asl20;
};
}