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

39 lines
754 B
Nix
Raw Normal View History

2017-12-30 12:25:04 +00:00
{ lib
, buildPythonPackage
, fetchPypi
, pytest
2020-06-20 16:28:34 +00:00
, pytest-asyncio
, 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 = "21.1.0";
2017-12-30 12:25:04 +00:00
src = fetchPypi {
inherit pname version;
sha256 = "d9d2d890532e8db83c6977a2a676fb1889922ff0c26ad4dc0ecac26f9fafbc57";
2017-12-30 12:25:04 +00:00
};
2020-06-20 16:28:34 +00:00
checkInputs = [ pytest pytest-asyncio 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/";
2017-12-30 12:25:04 +00:00
license = lib.licenses.asl20;
};
}