about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/urwid/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/urwid/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/urwid/default.nix48
1 files changed, 31 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/urwid/default.nix b/nixpkgs/pkgs/development/python-modules/urwid/default.nix
index 014382b21501..7f9512be2cb1 100644
--- a/nixpkgs/pkgs/development/python-modules/urwid/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/urwid/default.nix
@@ -1,43 +1,57 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, fetchpatch
-, isPy3k
+
+# build-system
+, setuptools
+, setuptools-scm
+, wheel
+
+# tests
 , glibcLocales
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "urwid";
-  version = "2.1.2";
-  format = "setuptools";
+  version = "2.2.1";
+  format = "pyproject";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "588bee9c1cb208d0906a9f73c613d2bd32c3ed3702012f51efe318a3f2127eae";
+    hash = "sha256-4zkRqxjyxz/dvpvyFtAh504gstWqm+MEA8WPVRMbuKE=";
   };
 
-  patches = [
-    # https://github.com/urwid/urwid/pull/517
-    (fetchpatch {
-      name = "python311-compat.patch";
-      url = "https://github.com/urwid/urwid/commit/42c1ed1eeb663179b265bae9b384d7ec11c8a9b5.patch";
-      hash = "sha256-Oz8O/M6AdqbB6C/BB5rtxp8FgdGhZUxkSxKIyq5Dmho=";
-    })
+  postPatch = ''
+    sed -i '/addopts =/d' pyproject.toml
+  '';
+
+  nativeBuildInputs = [
+    setuptools
+    setuptools-scm
+    wheel
   ];
 
-  # tests need to be able to set locale
-  LC_ALL = "en_US.UTF-8";
-  nativeCheckInputs = [ glibcLocales ];
+  nativeCheckInputs = [
+    glibcLocales
+    pytestCheckHook
+  ];
+
+  env.LC_ALL = "en_US.UTF8";
 
-  # tests which assert on strings don't decode results correctly
-  doCheck = isPy3k;
+  disabledTestPaths = [
+    # expect call hangs
+    "urwid/tests/test_vterm.py"
+  ];
 
   pythonImportsCheck = [
     "urwid"
   ];
 
   meta = with lib; {
+    changelog = "https://github.com/urwid/urwid/releases/tag/${version}";
     description = "A full-featured console (xterm et al.) user interface library";
+    downloadPage = "https://github.com/urwid/urwid";
     homepage = "https://urwid.org/";
     license = licenses.lgpl21Plus;
     maintainers = with maintainers; [ ];