about summary refs log tree commit diff
path: root/pkgs/development/python-modules/logutils/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/logutils/default.nix')
-rw-r--r--pkgs/development/python-modules/logutils/default.nix38
1 files changed, 27 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/logutils/default.nix b/pkgs/development/python-modules/logutils/default.nix
index 7f35845785634..b79e6af6c9786 100644
--- a/pkgs/development/python-modules/logutils/default.nix
+++ b/pkgs/development/python-modules/logutils/default.nix
@@ -1,26 +1,39 @@
-{ lib
-, stdenv
-, buildPythonPackage
-, fetchPypi
-, pytestCheckHook
-, redis
-, redis-server
+{
+  lib,
+  stdenv,
+  buildPythonPackage,
+  fetchPypi,
+  pytestCheckHook,
+  pythonOlder,
+  redis,
+  redis-server,
+  setuptools,
 }:
 
 buildPythonPackage rec {
   pname = "logutils";
   version = "0.3.5";
-  format = "setuptools";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "bc058a25d5c209461f134e1f03cab637d66a7a5ccc12e593db56fbb279899a82";
+    hash = "sha256-vAWKJdXCCUYfE04fA8q2N9ZqelzMEuWT21b7snmJmoI=";
   };
 
-  nativeCheckInputs = [
+  postPatch = ''
+    substituteInPlace tests/test_dictconfig.py \
+      --replace-fail "assertEquals" "assertEqual"
+    substituteInPlace tests/test_redis.py \
+      --replace-fail "'redis-server'" "'${redis-server}/bin/redis-server'"
+  '';
+
+  build-system = [ setuptools ];
+
+  dependencies = [
     pytestCheckHook
     redis
-    redis-server
   ];
 
   disabledTests = [
@@ -33,9 +46,12 @@ buildPythonPackage rec {
     "tests/test_redis.py"
   ];
 
+  pythonImportsCheck = [ "logutils" ];
+
   meta = with lib; {
     description = "Logging utilities";
     homepage = "https://bitbucket.org/vinay.sajip/logutils/";
     license = licenses.bsd0;
+    maintainers = with maintainers; [ ];
   };
 }