1{ lib
2, buildPythonPackage
3, cryptography
4, fetchFromGitHub
5, mypy
6, pyjwt
7, pytestCheckHook
8, pythonOlder
9, requests
10, responses
11, typing-extensions
12}:
13
14buildPythonPackage rec {
15 pname = "globus-sdk";
16 version = "3.14.0";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.6";
20
21 src = fetchFromGitHub {
22 owner = "globus";
23 repo = "globus-sdk-python";
24 rev = "refs/tags/${version}";
25 hash = "sha256-lCqiBlyf0cUqsmSlCmt+jXTBGsXyCioZ232zd5rVqiA=";
26 };
27
28 propagatedBuildInputs = [
29 cryptography
30 requests
31 pyjwt
32 ] ++ lib.optionals (pythonOlder "3.10") [
33 typing-extensions
34 ];
35
36 checkInputs = [
37 mypy
38 pytestCheckHook
39 responses
40 ];
41
42 postPatch = ''
43 substituteInPlace setup.py \
44 --replace "pyjwt[crypto]>=2.0.0,<3.0.0" "pyjwt[crypto]>=2.0.0,<3.0.0"
45 '';
46
47 pytestFlagsArray = [
48 "-W"
49 "ignore::DeprecationWarning"
50 ];
51
52 pythonImportsCheck = [
53 "globus_sdk"
54 ];
55
56 meta = with lib; {
57 description = "Interface to Globus REST APIs, including the Transfer API and the Globus Auth API";
58 homepage = "https://github.com/globus/globus-sdk-python";
59 license = licenses.asl20;
60 maintainers = with maintainers; [ ixxie ];
61 };
62}