2017-12-30 12:25:04 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2018-01-08 15:46:40 +00:00
|
|
|
, fetchpatch
|
2017-12-30 12:25:04 +00:00
|
|
|
, pytest
|
|
|
|
, pretend
|
|
|
|
, freezegun
|
|
|
|
, simplejson
|
2018-10-14 18:48:33 +01:00
|
|
|
, six
|
2017-12-30 12:25:04 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "structlog";
|
2017-12-30 12:25:32 +00:00
|
|
|
version = "17.2.0";
|
2017-12-30 12:25:04 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-12-30 12:25:32 +00:00
|
|
|
sha256 = "6980001045abd235fa12582222627c19b89109e58b85eb77d5a5abc778df6e20";
|
2017-12-30 12:25:04 +00:00
|
|
|
};
|
|
|
|
|
2018-01-08 15:46:40 +00:00
|
|
|
patches = [
|
|
|
|
# Fix tests for pytest 3.3
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/hynek/structlog/commit/22f0ae50607a0cb024361599f84610ce290deb99.patch";
|
|
|
|
sha256 = "03622i13ammkpyrdk48kimbz94gbkpcmdpy0kj2z09m1kp6q2ljv";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-10-14 18:48:33 +01:00
|
|
|
checkInputs = [ pytest pretend freezegun simplejson ];
|
|
|
|
propagatedBuildInputs = [ six ];
|
2017-12-30 12:25:04 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
rm tests/test_twisted.py*
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Painless structural logging";
|
|
|
|
homepage = http://www.structlog.org/;
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
};
|
2018-01-08 15:46:40 +00:00
|
|
|
}
|