about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeder Bergebakken Sundt <pbsds@hotmail.com>2024-05-12 01:58:00 +0200
committerGitHub <noreply@github.com>2024-05-12 01:58:00 +0200
commit8f10cb5a63d61204e9589acc43d483a63f46b986 (patch)
tree3fe9abae87b2048e7d8b7e656223b74d80ef1a31
parentf11f944671a7053bc543faf3c964c70179a4522e (diff)
parentbc82deabf25275420b888dbedb1392c9994ce70e (diff)
Merge pull request #310885 from TomaSajt/wsgitools
python312Packages.wsgitools: use pyproject = true, fix with python312
-rw-r--r--pkgs/development/python-modules/wsgitools/default.nix24
1 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/wsgitools/default.nix b/pkgs/development/python-modules/wsgitools/default.nix
index 948f932271c18..17eb56ec4e2b1 100644
--- a/pkgs/development/python-modules/wsgitools/default.nix
+++ b/pkgs/development/python-modules/wsgitools/default.nix
@@ -1,18 +1,32 @@
-{lib
-,buildPythonPackage
-,fetchPypi
+{
+  lib,
+  buildPythonPackage,
+  pythonAtLeast,
+  fetchPypi,
+  setuptools,
+  pyasyncore,
+  unittestCheckHook,
 }:
 
 buildPythonPackage rec {
   pname = "wsgitools";
   version = "0.3.1";
-  format = "setuptools";
+  pyproject = true;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0q6kmrkqf02fgww7z1g9cw8f70fimdzs1bvv9inb7fsk0c3pcf1i";
+    hash = "sha256-MTh2BwNTu7NsTHuvoH+r0YHjEGfphX84f04Ah2eu02A=";
   };
 
+  build-system = [ setuptools ];
+
+  # the built-in asyncore library was removed in python 3.12
+  dependencies = lib.optionals (pythonAtLeast "3.12") [ pyasyncore ];
+
+  pythonImportsCheck = [ "wsgitools" ];
+
+  nativeCheckInputs = [ unittestCheckHook ];
+
   meta = with lib; {
     maintainers = with maintainers; [ clkamp ];
     description = "A set of tools working with WSGI";