2017-12-30 04:25:04 -08:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
2018-10-25 08:43:07 -07:00
|
|
|
, python-rapidjson
|
2017-12-30 04:25:04 -08:00
|
|
|
, pretend
|
|
|
|
, freezegun
|
2018-10-25 08:43:07 -07:00
|
|
|
, twisted
|
2017-12-30 04:25:04 -08:00
|
|
|
, simplejson
|
2018-10-14 10:48:33 -07:00
|
|
|
, six
|
2018-10-25 08:43:07 -07:00
|
|
|
, pythonAtLeast
|
2017-12-30 04:25:04 -08:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "structlog";
|
2019-10-23 23:47:49 -07:00
|
|
|
version = "19.2.0";
|
2017-12-30 04:25:04 -08:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-23 23:47:49 -07:00
|
|
|
sha256 = "4287058cf4ce1a59bc5dea290d6386d37f29a37529c9a51cdf7387e51710152b";
|
2017-12-30 04:25:04 -08:00
|
|
|
};
|
|
|
|
|
2018-10-25 08:43:07 -07:00
|
|
|
checkInputs = [ pytest pretend freezegun simplejson twisted ]
|
|
|
|
++ lib.optionals (pythonAtLeast "3.6") [ python-rapidjson ];
|
2018-10-14 10:48:33 -07:00
|
|
|
propagatedBuildInputs = [ six ];
|
2017-12-30 04:25:04 -08:00
|
|
|
|
|
|
|
checkPhase = ''
|
2018-10-25 08:43:07 -07:00
|
|
|
# rm tests/test_twisted.py*
|
2017-12-30 04:25:04 -08:00
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Painless structural logging";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "http://www.structlog.org/";
|
2017-12-30 04:25:04 -08:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
};
|
2018-01-08 07:46:40 -08:00
|
|
|
}
|