From f1a7704d476dea87f0b5164a8e903695356d132e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 16 Jan 2024 11:20:30 +0100 Subject: [PATCH 1/3] python311Packages.yaspin: force colored output in termwiz, remove outdated postPatch --- pkgs/development/python-modules/yaspin/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/yaspin/default.nix b/pkgs/development/python-modules/yaspin/default.nix index c90da30a746b..92680bc632d1 100644 --- a/pkgs/development/python-modules/yaspin/default.nix +++ b/pkgs/development/python-modules/yaspin/default.nix @@ -33,10 +33,9 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - # https://github.com/pavdmyt/yaspin/pull/212 - substituteInPlace pyproject.toml \ - --replace 'termcolor-whl = "1.1.2"' 'termcolor = "*"' + # tests assert for \033 which gets turned off in termcolor when TERM dumb is used which is used by nix + preCheck = '' + export FORCE_COLOR=1 ''; pythonImportsCheck = [ From 88aa923563f2373390d836e735b19478bf4339f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 16 Jan 2024 11:20:55 +0100 Subject: [PATCH 2/3] python311Packages.yaspin: speed up tests with xdist from ~17.7 sec to ~5.5s --- pkgs/development/python-modules/yaspin/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/yaspin/default.nix b/pkgs/development/python-modules/yaspin/default.nix index 92680bc632d1..0235c06ab149 100644 --- a/pkgs/development/python-modules/yaspin/default.nix +++ b/pkgs/development/python-modules/yaspin/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchFromGitHub , poetry-core +, pytest-xdist , pytestCheckHook , pythonOlder , termcolor @@ -30,6 +31,7 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + pytest-xdist pytestCheckHook ]; From b55e709167ec244a4e771249a0db220a6fd660f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 16 Jan 2024 23:07:26 +0100 Subject: [PATCH 3/3] python311Packages.termcolor: update meta --- pkgs/development/python-modules/termcolor/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/termcolor/default.nix b/pkgs/development/python-modules/termcolor/default.nix index 9a0af4e558e2..474af852d39f 100644 --- a/pkgs/development/python-modules/termcolor/default.nix +++ b/pkgs/development/python-modules/termcolor/default.nix @@ -30,9 +30,8 @@ buildPythonPackage rec { ]; meta = with lib; { - description = "Termcolor"; - homepage = "https://pypi.python.org/pypi/termcolor"; + description = "ANSI color formatting for output in terminal"; + homepage = "https://github.com/termcolor/termcolor"; license = licenses.mit; }; - }