2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-04-25 03:57:28 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
, click
|
|
|
|
, mock
|
2021-01-09 10:05:03 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, google-auth
|
2022-04-27 09:35:20 +00:00
|
|
|
, 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-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
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-02-29 20:09:43 +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 [
|
2023-10-09 19:29:22 +00:00
|
|
|
# This test fails if the hostname is not associated with an IP (e.g., in `/etc/hosts`).
|
|
|
|
"test_run_local_server_bind_addr"
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|