2023-04-12 12:48:02 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2021-01-09 10:05:03 +00:00
|
|
|
, buildPythonPackage
|
2022-08-12 12:06:08 +00:00
|
|
|
, aiohttp
|
|
|
|
, aioresponses
|
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
|
|
|
|
, six
|
2022-08-12 12:06:08 +00:00
|
|
|
, urllib3
|
2021-01-09 10:05:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-auth";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "2.17.3";
|
2023-01-11 07:51:40 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-zjEeK8WLEw/d8xbfV8mzlDwqe09uwx3pZjqTM+QGTvw=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cachetools
|
|
|
|
pyasn1-modules
|
|
|
|
rsa
|
2022-08-12 12:06:08 +00:00
|
|
|
six
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
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 = [
|
|
|
|
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
|
|
|
urllib3
|
|
|
|
] ++ passthru.optional-dependencies.aiohttp
|
2022-09-09 14:08:57 +00:00
|
|
|
# `cryptography` is still required on `aarch64-darwin` for `tests/crypt/*`
|
|
|
|
++ (if (stdenv.isDarwin && stdenv.isAarch64) then [ cryptography ] else 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;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|