2023-04-12 12:48:02 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-08-12 12:06:08 +00:00
|
|
|
, aiohttp
|
|
|
|
, aioresponses
|
2023-05-24 13:37:59 +00:00
|
|
|
, buildPythonPackage
|
2023-04-12 12:48:02 +00:00
|
|
|
, cachetools
|
|
|
|
, cryptography
|
|
|
|
, fetchPypi
|
2021-01-09 10:05:03 +00:00
|
|
|
, flask
|
|
|
|
, freezegun
|
2022-08-12 12:06:08 +00:00
|
|
|
, grpcio
|
2021-01-09 10:05:03 +00:00
|
|
|
, mock
|
|
|
|
, oauth2client
|
2023-04-12 12:48:02 +00:00
|
|
|
, pyasn1-modules
|
|
|
|
, pyopenssl
|
2022-08-12 12:06:08 +00:00
|
|
|
, pytest-asyncio
|
2021-01-09 10:05:03 +00:00
|
|
|
, pytest-localserver
|
2022-08-12 12:06:08 +00:00
|
|
|
, pytestCheckHook
|
2023-04-12 12:48:02 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pyu2f
|
|
|
|
, requests
|
2021-01-09 10:05:03 +00:00
|
|
|
, responses
|
2023-04-12 12:48:02 +00:00
|
|
|
, rsa
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
2021-01-09 10:05:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-auth";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.28.1";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-NPwwRsJXztzxYi/Esx/Cvnkj2bTUSXPUgRJezFDYOIU=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2023-11-16 04:20:00 +00:00
|
|
|
];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cachetools
|
|
|
|
pyasn1-modules
|
|
|
|
rsa
|
|
|
|
];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
aiohttp = [
|
|
|
|
aiohttp
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
enterprise_cert = [
|
|
|
|
cryptography
|
|
|
|
pyopenssl
|
|
|
|
];
|
|
|
|
pyopenssl = [
|
2024-02-29 20:09:43 +00:00
|
|
|
cryptography
|
2022-08-12 12:06:08 +00:00
|
|
|
pyopenssl
|
|
|
|
];
|
|
|
|
reauth = [
|
|
|
|
pyu2f
|
|
|
|
];
|
2023-01-11 07:51:40 +00:00
|
|
|
requests = [
|
|
|
|
requests
|
|
|
|
];
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
aioresponses
|
2021-01-09 10:05:03 +00:00
|
|
|
flask
|
|
|
|
freezegun
|
2022-08-12 12:06:08 +00:00
|
|
|
grpcio
|
2021-01-09 10:05:03 +00:00
|
|
|
mock
|
|
|
|
oauth2client
|
2022-08-12 12:06:08 +00:00
|
|
|
pytest-asyncio
|
2021-01-09 10:05:03 +00:00
|
|
|
pytest-localserver
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestCheckHook
|
2021-01-09 10:05:03 +00:00
|
|
|
responses
|
2022-08-12 12:06:08 +00:00
|
|
|
] ++ passthru.optional-dependencies.aiohttp
|
2024-02-29 20:09:43 +00:00
|
|
|
++ passthru.optional-dependencies.enterprise_cert
|
2022-08-12 12:06:08 +00:00
|
|
|
++ passthru.optional-dependencies.reauth;
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"google.auth"
|
|
|
|
"google.oauth2"
|
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
disabledTestPaths = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
|
|
|
|
# Disable tests using pyOpenSSL as it does not build on M1 Macs
|
2022-07-14 12:49:19 +00:00
|
|
|
"tests/transport/test__mtls_helper.py"
|
|
|
|
"tests/transport/test_requests.py"
|
|
|
|
"tests/transport/test_urllib3.py"
|
2022-09-09 14:08:57 +00:00
|
|
|
"tests/transport/test__custom_tls_signer.py"
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-09 10:05:03 +00:00
|
|
|
description = "Google Auth Python Library";
|
|
|
|
longDescription = ''
|
2023-01-11 07:51:40 +00:00
|
|
|
This library simplifies using Google's various server-to-server
|
2021-01-09 10:05:03 +00:00
|
|
|
authentication mechanisms to access Google APIs.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/googleapis/google-auth-library-python";
|
|
|
|
changelog = "https://github.com/googleapis/google-auth-library-python/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.asl20;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
}
|