From 9ad05a3835662c200fbbfbe5894b7e61c31ff022 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 3 May 2022 15:42:12 +0000 Subject: [PATCH 1/2] python310Packages.python-sql: 1.3.0 -> 1.4.0 --- pkgs/development/python-modules/python-sql/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-sql/default.nix b/pkgs/development/python-modules/python-sql/default.nix index a32dcfa5f00..6c29948fe0b 100644 --- a/pkgs/development/python-modules/python-sql/default.nix +++ b/pkgs/development/python-modules/python-sql/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "python-sql"; - version = "1.3.0"; + version = "1.4.0"; src = fetchPypi { inherit pname version; - sha256 = "9d603a6273f2f5966bab7ce77e1f50e88818d5237ac85e566e2dc84ebfabd176"; + sha256 = "sha256-b+dkCC9IiR2Ffqfm+kJfpU8TUx3fa4nyTAmOZGrRtLY="; }; meta = { From 4381a2796d19c099a0ee29342b105aeabd036f60 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 3 May 2022 19:13:39 +0200 Subject: [PATCH 2/2] python310Packages.python-sql: switch to pytestCheckHook - add pythonImportsCheck - disable on older Python releases --- .../python-modules/python-sql/default.nix | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/python-sql/default.nix b/pkgs/development/python-modules/python-sql/default.nix index 6c29948fe0b..91012839d05 100644 --- a/pkgs/development/python-modules/python-sql/default.nix +++ b/pkgs/development/python-modules/python-sql/default.nix @@ -1,18 +1,34 @@ -{ lib, fetchPypi, buildPythonPackage }: +{ lib +, fetchPypi +, buildPythonPackage +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "python-sql"; version = "1.4.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-b+dkCC9IiR2Ffqfm+kJfpU8TUx3fa4nyTAmOZGrRtLY="; + hash = "sha256-b+dkCC9IiR2Ffqfm+kJfpU8TUx3fa4nyTAmOZGrRtLY="; }; - meta = { - homepage = "https://python-sql.tryton.org/"; - description = "A library to write SQL queries in a pythonic way"; - maintainers = with lib.maintainers; [ johbo ]; - license = lib.licenses.bsd3; + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "sql" + ]; + + meta = with lib; { + description = "Library to write SQL queries in a pythonic way"; + homepage = "https://pypi.org/project/python-sql/"; + license = licenses.bsd3; + maintainers = with maintainers; [ johbo ]; }; }