depot/third_party/nixpkgs/pkgs/development/python-modules/globus-sdk/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

61 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, cryptography
, fetchFromGitHub
, pyjwt
, pytestCheckHook
, pythonOlder
, requests
, responses
, typing-extensions
}:
buildPythonPackage rec {
pname = "globus-sdk";
version = "3.28.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "globus";
repo = "globus-sdk-python";
rev = "refs/tags/${version}";
hash = "sha256-mKtqfEpnWftpGReaUrmXf3LftZnMtEizPi4RbIwgnUM=";
};
propagatedBuildInputs = [
cryptography
requests
pyjwt
] ++ lib.optionals (pythonOlder "3.10") [
typing-extensions
];
nativeCheckInputs = [
pytestCheckHook
responses
];
postPatch = ''
substituteInPlace setup.py \
--replace "pyjwt[crypto]>=2.0.0,<3.0.0" "pyjwt[crypto]>=2.0.0,<3.0.0"
'';
pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];
pythonImportsCheck = [
"globus_sdk"
];
meta = with lib; {
description = "Interface to Globus REST APIs, including the Transfer API and the Globus Auth API";
homepage = "https://github.com/globus/globus-sdk-python";
changelog = "https://github.com/globus/globus-sdk-python/releases/tag/${version}";
license = licenses.asl20;
maintainers = with maintainers; [ ixxie ];
};
}