From b048539afb23542dd33768604c5935a60a7926ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 22 May 2022 20:47:13 +0000 Subject: [PATCH] python3Packages.pamqp: run tests --- .../python-modules/pamqp/default.nix | 42 +++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/pamqp/default.nix b/pkgs/development/python-modules/pamqp/default.nix index 1785a8593102..a367a180807d 100644 --- a/pkgs/development/python-modules/pamqp/default.nix +++ b/pkgs/development/python-modules/pamqp/default.nix @@ -1,28 +1,46 @@ { lib , buildPythonPackage -, fetchPypi -, mock -, nose -, pep8 -, pylint -, mccabe +, pythonOlder +, fetchFromGitHub +, pytestCheckHook }: buildPythonPackage rec { version = "3.1.0"; pname = "pamqp"; - src = fetchPypi { - inherit pname version; - sha256 = "e4f0886d72c6166637a5513626148bf5a7e818073a558980e9aaed8b4ccf30da"; + disabled = pythonOlder "3.7"; + + format = "setuptools"; + + src = fetchFromGitHub { + owner = "gmr"; + repo = "pamqp"; + rev = version; + hash = "sha256-qiYfQsyYvG6pyRFDt3pyYKNNWNP88maj+VAeGD68OmY="; }; - buildInputs = [ mock nose pep8 pylint mccabe ]; + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pamqp.base" + "pamqp.body" + "pamqp.commands" + "pamqp.common" + "pamqp.decode" + "pamqp.encode" + "pamqp.exceptions" + "pamqp.frame" + "pamqp.header" + "pamqp.heartbeat" + ]; meta = with lib; { description = "RabbitMQ Focused AMQP low-level library"; - homepage = "https://pypi.python.org/pypi/pamqp"; + homepage = "https://github.com/gmr/pamqp"; license = licenses.bsd3; + maintainers = with maintainers; [ dotlambda ]; }; - }