From d5c2dae9776f79495601ea4457c20e7be4731fab Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 3 Jan 2023 00:15:55 +0100 Subject: [PATCH] python3Packages.cli-helpers: reformat --- .../python-modules/cli-helpers/default.nix | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/cli-helpers/default.nix b/pkgs/development/python-modules/cli-helpers/default.nix index 02b6c6fccda..7d7930b4f8b 100644 --- a/pkgs/development/python-modules/cli-helpers/default.nix +++ b/pkgs/development/python-modules/cli-helpers/default.nix @@ -1,37 +1,43 @@ -{ lib, buildPythonPackage, fetchPypi, isPy27 +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder , backports_csv , configobj , mock -, pytest +, pytestCheckHook +, pygments , tabulate , terminaltables , wcwidth }: buildPythonPackage rec { - pname = "cli_helpers"; + pname = "cli-helpers"; version = "2.3.0"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { - inherit pname version; - sha256 = "sha256-5xdNADorWP0+Mac/u8RdWqUT3mLL1C1Df3i5ZYvV+Wc="; + pname = "cli_helpers"; + inherit version; + hash = "sha256-5xdNADorWP0+Mac/u8RdWqUT3mLL1C1Df3i5ZYvV+Wc="; }; propagatedBuildInputs = [ configobj - terminaltables tabulate - wcwidth - ] ++ (lib.optionals isPy27 [ backports_csv ]); + ] ++ tabulate.optional-dependencies.widechars; - # namespace collision between backport.csv and backports.configparser - doCheck = !isPy27; + passthru.optional-dependencies = { + styles = [ pygments ]; + }; - checkInputs = [ pytest mock ]; - - checkPhase = '' - py.test - ''; + checkInputs = [ + pytestCheckHook + mock + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); meta = with lib; { description = "Python helpers for common CLI tasks";