mastodon: 4.3.1 -> 4.3.2 (#361487)
[NixPkgs.git] / pkgs / development / python-modules / google-auth / default.nix
blob35dd5b86b9fbcc40abaf2c1bd81148ab2658e080
2   lib,
3   stdenv,
4   aiohttp,
5   aioresponses,
6   buildPythonPackage,
7   cachetools,
8   cryptography,
9   fetchPypi,
10   flask,
11   freezegun,
12   grpcio,
13   mock,
14   oauth2client,
15   pyasn1-modules,
16   pyopenssl,
17   pytest-asyncio,
18   pytest-localserver,
19   pytestCheckHook,
20   pythonOlder,
21   pyu2f,
22   requests,
23   responses,
24   rsa,
25   setuptools,
28 buildPythonPackage rec {
29   pname = "google-auth";
30   version = "2.35.0";
31   pyproject = true;
33   disabled = pythonOlder "3.7";
35   src = fetchPypi {
36     pname = "google_auth";
37     inherit version;
38     hash = "sha256-9MZO1OAejotkbvNMAY+L8zON8MjjfYs7ukDn9XSjJ4o=";
39   };
41   nativeBuildInputs = [ setuptools ];
43   propagatedBuildInputs = [
44     cachetools
45     pyasn1-modules
46     rsa
47   ];
49   optional-dependencies = {
50     aiohttp = [
51       aiohttp
52       requests
53     ];
54     enterprise_cert = [
55       cryptography
56       pyopenssl
57     ];
58     pyopenssl = [
59       cryptography
60       pyopenssl
61     ];
62     reauth = [ pyu2f ];
63     requests = [ requests ];
64   };
66   nativeCheckInputs =
67     [
68       aioresponses
69       flask
70       freezegun
71       grpcio
72       mock
73       oauth2client
74       pytest-asyncio
75       pytest-localserver
76       pytestCheckHook
77       responses
78     ]
79     ++ optional-dependencies.aiohttp
80     ++ optional-dependencies.enterprise_cert
81     ++ optional-dependencies.reauth;
83   pythonImportsCheck = [
84     "google.auth"
85     "google.oauth2"
86   ];
88   disabledTestPaths = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
89     # Disable tests using pyOpenSSL as it does not build on M1 Macs
90     "tests/transport/test__mtls_helper.py"
91     "tests/transport/test_requests.py"
92     "tests/transport/test_urllib3.py"
93     "tests/transport/test__custom_tls_signer.py"
94   ];
96   __darwinAllowLocalNetworking = true;
98   meta = with lib; {
99     description = "Google Auth Python Library";
100     longDescription = ''
101       This library simplifies using Google's various server-to-server
102       authentication mechanisms to access Google APIs.
103     '';
104     homepage = "https://github.com/googleapis/google-auth-library-python";
105     changelog = "https://github.com/googleapis/google-auth-library-python/blob/v${version}/CHANGELOG.md";
106     license = licenses.asl20;
107     maintainers = [ ];
108   };