From 5a63df0c118656b9349ee60a944a2024b3efd6cd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 10 Jan 2022 09:35:20 +0100 Subject: [PATCH] python3Packages.transip: switch to pytestCheckHook --- .../python-modules/transip/default.nix | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/transip/default.nix b/pkgs/development/python-modules/transip/default.nix index 94d3cb85be40..ff37464a0f34 100644 --- a/pkgs/development/python-modules/transip/default.nix +++ b/pkgs/development/python-modules/transip/default.nix @@ -1,36 +1,46 @@ { lib , buildPythonPackage , fetchFromGitHub -, isPy27 , requests , cryptography , suds-jurko -, pytest +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { - pname = "transip-api"; + pname = "transip"; version = "2.0.0"; - disabled = isPy27; + format = "setuptools"; + + disabled = pythonOlder "3.5"; src = fetchFromGitHub { owner = "benkonrath"; - repo = pname; + repo = "transip-api"; rev = "v${version}"; - sha256 = "153x8ph7cp432flaqiy2zgp060ddychcqcrssxkcmjvbm86xrz17"; + hash = "sha256-J/zcDapry8pm1zozzCDzrQED7vvCR6yoE4NcduBFfZQ="; }; - checkInputs = [ pytest ]; + propagatedBuildInputs = [ + requests + cryptography + suds-jurko + ]; - # Constructor Tests require network access - checkPhase = '' - pytest --deselect=tests/service_tests/test_domain.py::TestDomainService::test_constructor \ - --deselect tests/service_tests/test_vps.py::TestVPSService::testConstructor \ - --deselect tests/service_tests/test_webhosting.py::TestWebhostingService::testConstructor - ''; + checkInputs = [ + pytestCheckHook + ]; + disabledTests = [ + # Constructor tests require network access + "test_constructor" + "testConstructor" + ]; - propagatedBuildInputs = [ requests cryptography suds-jurko ]; + pythonImportsCheck = [ + "transip" + ]; meta = with lib; { description = "TransIP API Connector";