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