1{ lib, buildPythonPackage, fetchPypi, isPy27 2, backports_csv 3, configobj 4, mock 5, pytest 6, tabulate 7, terminaltables 8, wcwidth 9}: 10 11buildPythonPackage rec { 12 pname = "cli_helpers"; 13 version = "2.3.0"; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "sha256-5xdNADorWP0+Mac/u8RdWqUT3mLL1C1Df3i5ZYvV+Wc="; 18 }; 19 20 propagatedBuildInputs = [ 21 configobj 22 terminaltables 23 tabulate 24 wcwidth 25 ] ++ (lib.optionals isPy27 [ backports_csv ]); 26 27 # namespace collision between backport.csv and backports.configparser 28 doCheck = !isPy27; 29 30 checkInputs = [ pytest mock ]; 31 32 checkPhase = '' 33 py.test 34 ''; 35 36 meta = with lib; { 37 description = "Python helpers for common CLI tasks"; 38 longDescription = '' 39 CLI Helpers is a Python package that makes it easy to perform common 40 tasks when building command-line apps. It's a helper library for 41 command-line interfaces. 42 43 Libraries like Click and Python Prompt Toolkit are amazing tools that 44 help you create quality apps. CLI Helpers complements these libraries by 45 wrapping up common tasks in simple interfaces. 46 47 CLI Helpers is not focused on your app's design pattern or framework -- 48 you can use it on its own or in combination with other libraries. It's 49 lightweight and easy to extend. 50 51 What's included in CLI Helpers? 52 53 - Prettyprinting of tabular data with custom pre-processing 54 - [in progress] config file reading/writing 55 56 Read the documentation at http://cli-helpers.rtfd.io 57 ''; 58 homepage = "https://cli-helpers.readthedocs.io/en/stable/"; 59 license = licenses.bsd3 ; 60 maintainers = [ maintainers.kalbasit ]; 61 }; 62}