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

39 lines
754 B
Nix
Raw Normal View History

2017-12-30 15:25:04 +03:00
{ lib
, buildPythonPackage
, fetchPypi
, pytest
2020-06-20 19:28:34 +03:00
, pytest-asyncio
, python-rapidjson
2017-12-30 15:25:04 +03:00
, pretend
, freezegun
, twisted
2017-12-30 15:25:04 +03:00
, simplejson
, six
, pythonAtLeast
2017-12-30 15:25:04 +03:00
}:
buildPythonPackage rec {
pname = "structlog";
2020-06-06 09:47:33 +03:00
version = "20.1.0";
2017-12-30 15:25:04 +03:00
src = fetchPypi {
inherit pname version;
2020-06-06 09:47:33 +03:00
sha256 = "7a48375db6274ed1d0ae6123c486472aa1d0890b08d314d2b016f3aa7f35990b";
2017-12-30 15:25:04 +03:00
};
2020-06-20 19:28:34 +03:00
checkInputs = [ pytest pytest-asyncio pretend freezegun simplejson twisted ]
++ lib.optionals (pythonAtLeast "3.6") [ python-rapidjson ];
propagatedBuildInputs = [ six ];
2017-12-30 15:25:04 +03:00
checkPhase = ''
# rm tests/test_twisted.py*
2017-12-30 15:25:04 +03:00
py.test
'';
meta = {
description = "Painless structural logging";
homepage = "http://www.structlog.org/";
2017-12-30 15:25:04 +03:00
license = lib.licenses.asl20;
};
}