2019-09-13 22:42:08 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy27
|
|
|
|
, backports_csv
|
2018-12-23 16:09:45 +00:00
|
|
|
, configobj
|
2019-09-13 22:42:08 +01:00
|
|
|
, mock
|
|
|
|
, pytest
|
2018-08-06 23:48:22 +01:00
|
|
|
, tabulate
|
2019-09-13 22:42:08 +01:00
|
|
|
, terminaltables
|
2018-08-06 23:48:22 +01:00
|
|
|
, wcwidth
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cli_helpers";
|
2020-06-06 07:47:01 +01:00
|
|
|
version = "2.0.1";
|
2018-08-06 23:48:22 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-06 07:47:01 +01:00
|
|
|
sha256 = "18f7d8c5a22d85fc685d56a9f301d8b9f7f0d7d4e9033a27563b066c2ab41833";
|
2018-08-06 23:48:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2018-12-23 16:09:45 +00:00
|
|
|
configobj
|
2018-08-06 23:48:22 +01:00
|
|
|
terminaltables
|
|
|
|
tabulate
|
|
|
|
wcwidth
|
|
|
|
] ++ (lib.optionals isPy27 [ backports_csv ]);
|
|
|
|
|
2019-09-13 22:42:08 +01:00
|
|
|
# namespace collision between backport.csv and backports.configparser
|
|
|
|
doCheck = !isPy27;
|
|
|
|
|
2018-12-23 16:09:45 +00:00
|
|
|
checkInputs = [ pytest mock ];
|
2018-08-06 23:48:22 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python helpers for common CLI tasks";
|
|
|
|
longDescription = ''
|
|
|
|
CLI Helpers is a Python package that makes it easy to perform common
|
|
|
|
tasks when building command-line apps. It's a helper library for
|
|
|
|
command-line interfaces.
|
|
|
|
|
|
|
|
Libraries like Click and Python Prompt Toolkit are amazing tools that
|
|
|
|
help you create quality apps. CLI Helpers complements these libraries by
|
|
|
|
wrapping up common tasks in simple interfaces.
|
|
|
|
|
|
|
|
CLI Helpers is not focused on your app's design pattern or framework --
|
|
|
|
you can use it on its own or in combination with other libraries. It's
|
|
|
|
lightweight and easy to extend.
|
|
|
|
|
|
|
|
What's included in CLI Helpers?
|
|
|
|
|
|
|
|
- Prettyprinting of tabular data with custom pre-processing
|
|
|
|
- [in progress] config file reading/writing
|
|
|
|
|
|
|
|
Read the documentation at http://cli-helpers.rtfd.io
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://cli-helpers.readthedocs.io/en/stable/";
|
2018-08-06 23:48:22 +01:00
|
|
|
license = licenses.bsd3 ;
|
|
|
|
maintainers = [ maintainers.kalbasit ];
|
|
|
|
};
|
|
|
|
}
|