2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
2020-06-15 15:56:04 +00:00
|
|
|
, pytest-asyncio
|
2020-04-24 23:36:52 +00:00
|
|
|
, python-rapidjson
|
|
|
|
, pretend
|
|
|
|
, freezegun
|
|
|
|
, twisted
|
|
|
|
, simplejson
|
|
|
|
, six
|
|
|
|
, pythonAtLeast
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "structlog";
|
2021-10-14 00:43:12 +00:00
|
|
|
version = "21.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-14 00:43:12 +00:00
|
|
|
sha256 = "7ac42b565e1295712313f91edbcb64e0840a9037d888c8954f11fa6c43270e99";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
checkInputs = [ pytest pytest-asyncio pretend freezegun simplejson twisted ]
|
2020-04-24 23:36:52 +00:00
|
|
|
++ lib.optionals (pythonAtLeast "3.6") [ python-rapidjson ];
|
|
|
|
propagatedBuildInputs = [ six ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
# rm tests/test_twisted.py*
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Painless structural logging";
|
|
|
|
homepage = "http://www.structlog.org/";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|