2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
setuptools,
|
|
|
|
click,
|
|
|
|
mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
google-auth,
|
|
|
|
requests-oauthlib,
|
|
|
|
pythonOlder,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-auth-oauthlib";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.2.0";
|
|
|
|
pyproject = true;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-KS0tN4M0nysHNKCgIHseHjIqwZPCwJ2PfGE/t8xQHqg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-01-09 10:05:03 +00:00
|
|
|
google-auth
|
2022-04-27 09:35:20 +00:00
|
|
|
requests-oauthlib
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
tool = [ click ];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-01-09 10:05:03 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
2024-02-29 20:09:43 +00:00
|
|
|
] ++ passthru.optional-dependencies.tool;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# Flaky test. See https://github.com/NixOS/nixpkgs/issues/288424#issuecomment-1941609973.
|
|
|
|
"test_run_local_server_occupied_port"
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
# This test fails if the hostname is not associated with an IP (e.g., in `/etc/hosts`).
|
|
|
|
"test_run_local_server_bind_addr"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "google_auth_oauthlib" ];
|
2021-04-25 03:57:28 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://github.com/googleapis/google-auth-library-python-oauthlib/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Google Authentication Library: oauthlib integration";
|
|
|
|
homepage = "https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib";
|
|
|
|
license = licenses.asl20;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "google-oauthlib-tool";
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ terlar ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|