2018-09-12 08:36:31 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy3k, pytest, mock, brotli }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Logbook";
|
2019-09-28 16:07:22 +01:00
|
|
|
version = "1.5.2";
|
2018-09-12 08:36:31 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-09-28 16:07:22 +01:00
|
|
|
sha256 = "0mvsig6sk4dywpw5naah1npf6h621qzhg0sd427j5znr06a2ksqs";
|
2018-09-12 08:36:31 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ pytest ] ++ lib.optionals (!isPy3k) [ mock ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ brotli ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
find tests -name \*.pyc -delete
|
|
|
|
py.test tests
|
|
|
|
'';
|
|
|
|
|
2019-09-14 21:33:59 +01:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2018-09-12 08:36:31 +01:00
|
|
|
meta = {
|
|
|
|
homepage = https://pythonhosted.org/Logbook/;
|
|
|
|
description = "A logging replacement for Python";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|