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-09-19 14:19:46 +00:00
|
|
|
version = "1.2.1";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2024-09-19 14:19:46 +00:00
|
|
|
pname = "google_auth_oauthlib";
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-r9DK0JKi6qU82OgphVfW3hA0xstKdAUAtTV7ZIr5cmM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
dependencies = [
|
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-09-19 14:19:46 +00:00
|
|
|
optional-dependencies = {
|
2024-02-29 20:09:43 +00:00
|
|
|
tool = [ click ];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-01-09 10:05:03 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
2024-09-19 14:19:46 +00:00
|
|
|
] ++ 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; {
|
|
|
|
description = "Google Authentication Library: oauthlib integration";
|
|
|
|
homepage = "https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib";
|
2024-09-19 14:19:46 +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
|
|
|
license = licenses.asl20;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ terlar ];
|
2024-09-19 14:19:46 +00:00
|
|
|
mainProgram = "google-oauthlib-tool";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|