Martin Weinelt 2023-09-23 14:46:30 +02:00
parent 3bfa033e57
commit 57a5cbaae9

View file

@ -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; [ ];