From a8e5d43300a1f380349bf911a018a71697281bbe Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 30 Dec 2022 20:13:33 +0100 Subject: [PATCH] python3Packages.prettytable: 3.4.1 -> 3.5.0 --- .../python-modules/prettytable/default.nix | 50 ++++++++++++------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/prettytable/default.nix b/pkgs/development/python-modules/prettytable/default.nix index 922f85990db7..6df087e3e68e 100644 --- a/pkgs/development/python-modules/prettytable/default.nix +++ b/pkgs/development/python-modules/prettytable/default.nix @@ -1,24 +1,35 @@ { lib , buildPythonPackage -, fetchPypi -, glibcLocales -, setuptools-scm +, fetchFromGitHub +, pythonOlder +, hatch-vcs +, hatchling , wcwidth , importlib-metadata -, pythonOlder +, pytest-lazy-fixture +, pytestCheckHook }: buildPythonPackage rec { pname = "prettytable"; - version = "3.4.1"; + version = "3.5.0"; + format = "pyproject"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-fX3YTQsgby2qxEcacvKZ1pB/NFFgZP6yg44zOk4lZ70="; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "jazzband"; + repo = "prettytable"; + rev = "refs/tags/${version}"; + hash= "sha256-J6oWNug2MEkUZSi67mM5H/Nf4tdSTB/ku34plp1XWCM="; }; - nativeBuildInputs = [ setuptools-scm ]; - buildInputs = [ glibcLocales ]; + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + hatch-vcs + hatchling + ]; propagatedBuildInputs = [ wcwidth @@ -26,18 +37,21 @@ buildPythonPackage rec { importlib-metadata ]; - preCheck = '' - export LANG="en_US.UTF-8" - ''; + checkInputs = [ + pytest-lazy-fixture + pytestCheckHook + ]; - # no test no longer available in pypi package - doCheck = false; - pythonImportsCheck = [ "prettytable" ]; + pythonImportsCheck = [ + "prettytable" + ]; meta = with lib; { - description = "Simple Python library for easily displaying tabular data in a visually appealing ASCII table format"; - homepage = "http://code.google.com/p/prettytable/"; + changelog = "https://github.com/jazzband/prettytable/releases/tag/${version}"; + description = "Display tabular data in a visually appealing ASCII table format"; + homepage = "https://github.com/jazzband/prettytable"; license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; }