From 57a5cbaae9edc34772f4b434dcffb7a7786aa2ec Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 23 Sep 2023 14:46:30 +0200 Subject: [PATCH] python311Packages.urwid: 2.1.2 -> 2.2.1 https://github.com/urwid/urwid/releases/tag/2.2.0 https://github.com/urwid/urwid/releases/tag/2.2.1 --- .../python-modules/urwid/default.nix | 48 ++++++++++++------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/urwid/default.nix b/pkgs/development/python-modules/urwid/default.nix index 014382b21501..7f9512be2cb1 100644 --- a/pkgs/development/python-modules/urwid/default.nix +++ b/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 + ]; - # tests which assert on strings don't decode results correctly - doCheck = isPy3k; + env.LC_ALL = "en_US.UTF8"; + + 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; [ ];