From f7a8d301f781b4ca6984c9805103bbfa250b74f1 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 8 Feb 2021 01:42:00 +0100 Subject: [PATCH] python3Packages.globus-sdk: enable tests, add pythonImportsCheck --- .../python-modules/globus-sdk/default.nix | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/globus-sdk/default.nix b/pkgs/development/python-modules/globus-sdk/default.nix index 52662146262..0c2d74a90e1 100644 --- a/pkgs/development/python-modules/globus-sdk/default.nix +++ b/pkgs/development/python-modules/globus-sdk/default.nix @@ -1,35 +1,37 @@ { lib , buildPythonPackage -, flake8 -, nose2 -, mock +, fetchFromGitHub , requests , pyjwt -, fetchPypi +, pytestCheckHook +, responses }: buildPythonPackage rec { pname = "globus-sdk"; version = "2.0.1"; - src = fetchPypi { - inherit pname version; - sha256 = "94225982da7596f5bc8cd3dc30a4746014bf1f501cc8b23fe4dfd230114ae7e6"; + src = fetchFromGitHub { + owner = "globus"; + repo = "globus-sdk-python"; + rev = version; + sha256 = "1kqnr50iwcq9nx40lblbqzf327cdcbkrir6vh70067hk33rq0gm9"; }; - checkPhase = '' - py.test tests - ''; + propagatedBuildInputs = [ + requests + pyjwt + ]; - # No tests in archive - doCheck = false; + checkInputs = [ + pytestCheckHook + responses + ]; - checkInputs = [ flake8 nose2 mock ]; - - propagatedBuildInputs = [ requests pyjwt ]; + pythonImportsCheck = [ "globus_sdk" ]; meta = with lib; { - description = "A convenient Pythonic interface to Globus REST APIs, including the Transfer API and the Globus Auth API."; + description = "A convenient Pythonic interface to Globus REST APIs, including the Transfer API and the Globus Auth API"; homepage = "https://github.com/globus/globus-sdk-python"; license = licenses.asl20; maintainers = with maintainers; [ ixxie ];