From f35a9cf9675caf4cb370c67e0ba274075fc51d6a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 12 May 2022 02:38:38 +0000 Subject: [PATCH 1/2] python310Packages.pglast: 3.9 -> 3.10 --- pkgs/development/python-modules/pglast/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pglast/default.nix b/pkgs/development/python-modules/pglast/default.nix index a3836570f04b..1684f2f391e9 100644 --- a/pkgs/development/python-modules/pglast/default.nix +++ b/pkgs/development/python-modules/pglast/default.nix @@ -8,11 +8,11 @@ buildPythonPackage rec { pname = "pglast"; - version = "3.9"; + version = "3.10"; src = fetchPypi { inherit pname version; - sha256 = "sha256-fwXOfQW+ybhROdgayOAsgaFjf8HHh5jr5xczkBnA40w="; + sha256 = "sha256-rkoCtcBe5LBTTpmd+cj6s80UWXyTpMk74FipyK0t5go="; }; disabled = !isPy3k; From 21693b099b844a89a4f5de314aacb5ea147491f2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 12 May 2022 10:42:03 +0200 Subject: [PATCH 2/2] python310Packages.pglast: disable on older Python releases --- .../python-modules/pglast/default.nix | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/pglast/default.nix b/pkgs/development/python-modules/pglast/default.nix index 1684f2f391e9..5c1a4b74a87d 100644 --- a/pkgs/development/python-modules/pglast/default.nix +++ b/pkgs/development/python-modules/pglast/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , fetchPypi -, isPy3k +, pythonOlder , setuptools , pytest }: @@ -9,23 +9,27 @@ buildPythonPackage rec { pname = "pglast"; version = "3.10"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-rkoCtcBe5LBTTpmd+cj6s80UWXyTpMk74FipyK0t5go="; + hash = "sha256-rkoCtcBe5LBTTpmd+cj6s80UWXyTpMk74FipyK0t5go="; }; - disabled = !isPy3k; - - # ModuleNotFoundError: No module named 'pkg_resources' - propagatedBuildInputs = [ setuptools ]; + propagatedBuildInputs = [ + setuptools + ]; postPatch = '' substituteInPlace setup.cfg \ --replace "--cov=pglast --cov-report term-missing" "" ''; - checkInputs = [ pytest ]; + checkInputs = [ + pytest + ]; # pytestCheckHook doesn't work # ImportError: cannot import name 'parse_sql' from 'pglast' @@ -38,6 +42,6 @@ buildPythonPackage rec { description = "PostgreSQL Languages AST and statements prettifier"; changelog = "https://github.com/lelit/pglast/raw/v${version}/CHANGES.rst"; license = licenses.gpl3Plus; - maintainers = [ maintainers.marsam ]; + maintainers = with maintainers; [ marsam ]; }; }