From 1bb567545cb326fa5e5a05e566427f9e73c46d3b Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Sun, 28 Aug 2022 19:47:11 +1000 Subject: [PATCH] python3Packages.google-auth: fix tests on M1 Macs --- pkgs/development/python-modules/google-auth/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/google-auth/default.nix b/pkgs/development/python-modules/google-auth/default.nix index f1aba037ee01..02d0172b6865 100644 --- a/pkgs/development/python-modules/google-auth/default.nix +++ b/pkgs/development/python-modules/google-auth/default.nix @@ -72,7 +72,8 @@ buildPythonPackage rec { responses urllib3 ] ++ passthru.optional-dependencies.aiohttp - ++ passthru.optional-dependencies.enterprise_cert + # `cryptography` is still required on `aarch64-darwin` for `tests/crypt/*` + ++ (if (stdenv.isDarwin && stdenv.isAarch64) then [ cryptography ] else passthru.optional-dependencies.enterprise_cert) ++ passthru.optional-dependencies.reauth; pythonImportsCheck = [ @@ -80,11 +81,12 @@ buildPythonPackage rec { "google.oauth2" ]; - disabledTestPaths = [ - # Disable tests related to pyopenssl + disabledTestPaths = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + # Disable tests using pyOpenSSL as it does not build on M1 Macs "tests/transport/test__mtls_helper.py" "tests/transport/test_requests.py" "tests/transport/test_urllib3.py" + "tests/transport/test__custom_tls_signer.py" ]; meta = with lib; {