2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, glibcLocales
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2020-12-07 07:45:13 +00:00
|
|
|
, wcwidth
|
2021-05-20 23:08:51 +00:00
|
|
|
, importlib-metadata
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "prettytable";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "2.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "bd81678c108e6c73d4f1e47cd4283de301faaa6ff6220bcd1d4022038c56b416";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ glibcLocales ];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
wcwidth
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
2020-12-07 07:45:13 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
preCheck = ''
|
|
|
|
export LANG="en_US.UTF-8"
|
|
|
|
'';
|
|
|
|
|
2020-12-07 07:45:13 +00:00
|
|
|
# no test no longer available in pypi package
|
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "prettytable" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Simple Python library for easily displaying tabular data in a visually appealing ASCII table format";
|
|
|
|
homepage = "http://code.google.com/p/prettytable/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|