3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/structlog/default.nix

39 lines
733 B
Nix
Raw Normal View History

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