Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 pytestCheckHook, 7 pythonOlder, 8 redis, 9 redis-server, 10 setuptools, 11}: 12 13buildPythonPackage rec { 14 pname = "logutils"; 15 version = "0.3.5"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchPypi { 21 inherit pname version; 22 hash = "sha256-vAWKJdXCCUYfE04fA8q2N9ZqelzMEuWT21b7snmJmoI="; 23 }; 24 25 postPatch = '' 26 substituteInPlace tests/test_dictconfig.py \ 27 --replace-fail "assertEquals" "assertEqual" 28 substituteInPlace tests/test_redis.py \ 29 --replace-fail "'redis-server'" "'${redis-server}/bin/redis-server'" 30 ''; 31 32 build-system = [ setuptools ]; 33 34 dependencies = [ 35 pytestCheckHook 36 redis 37 ]; 38 39 disabledTests = [ 40 # https://bitbucket.org/vinay.sajip/logutils/issues/4/035-pytest-test-suite-warnings-and-errors 41 "test_hashandlers" 42 ]; 43 44 disabledTestPaths = lib.optionals (stdenv.isDarwin) [ 45 # Exception: unable to connect to Redis server 46 "tests/test_redis.py" 47 ]; 48 49 pythonImportsCheck = [ "logutils" ]; 50 51 meta = with lib; { 52 description = "Logging utilities"; 53 homepage = "https://bitbucket.org/vinay.sajip/logutils/"; 54 license = licenses.bsd0; 55 maintainers = [ ]; 56 }; 57}