python3Packages.structlog: fetch from github, fix tests
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pytest
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, pytest-asyncio
|
||||
, python-rapidjson
|
||||
, pretend
|
||||
, freezegun
|
||||
, twisted
|
||||
@@ -15,24 +14,22 @@
|
||||
buildPythonPackage rec {
|
||||
pname = "structlog";
|
||||
version = "21.4.0";
|
||||
format = "flit";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "305a66201f9605a2e8a2595271a446f258175901c09c01e4c2c2a8ac5b68edf1";
|
||||
# sdist is missing conftest.py
|
||||
src = fetchFromGitHub {
|
||||
owner = "hynek";
|
||||
repo = "structlog";
|
||||
rev = version;
|
||||
sha256 = "sha256-uXFSrC1TvQV46uu0sadC3eMq7yk5TnrpQE8m6NSv1Bg=";
|
||||
};
|
||||
|
||||
checkInputs = [ pytest pytest-asyncio pretend freezegun simplejson twisted ]
|
||||
++ lib.optionals (pythonAtLeast "3.6") [ python-rapidjson ];
|
||||
checkInputs = [ pytestCheckHook pytest-asyncio pretend freezegun simplejson twisted ];
|
||||
propagatedBuildInputs = [ six ];
|
||||
|
||||
checkPhase = ''
|
||||
# rm tests/test_twisted.py*
|
||||
py.test
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Painless structural logging";
|
||||
homepage = "http://www.structlog.org/";
|
||||
homepage = "https://github.com/hynek/structlog";
|
||||
license = lib.licenses.asl20;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user