1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, hatch-vcs
6, hatchling
7, wcwidth
8, importlib-metadata
9, pytest-lazy-fixture
10, pytestCheckHook
11}:
12
13buildPythonPackage rec {
14 pname = "prettytable";
15 version = "3.5.0";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "jazzband";
22 repo = "prettytable";
23 rev = "refs/tags/${version}";
24 hash= "sha256-J6oWNug2MEkUZSi67mM5H/Nf4tdSTB/ku34plp1XWCM=";
25 };
26
27 SETUPTOOLS_SCM_PRETEND_VERSION = version;
28
29 nativeBuildInputs = [
30 hatch-vcs
31 hatchling
32 ];
33
34 propagatedBuildInputs = [
35 wcwidth
36 ] ++ lib.optionals (pythonOlder "3.8") [
37 importlib-metadata
38 ];
39
40 nativeCheckInputs = [
41 pytest-lazy-fixture
42 pytestCheckHook
43 ];
44
45 pythonImportsCheck = [
46 "prettytable"
47 ];
48
49 meta = with lib; {
50 changelog = "https://github.com/jazzband/prettytable/releases/tag/${version}";
51 description = "Display tabular data in a visually appealing ASCII table format";
52 homepage = "https://github.com/jazzband/prettytable";
53 license = licenses.bsd3;
54 maintainers = with maintainers; [ ];
55 };
56
57}