From 3a1f6bf9f97449abc4eb0675d0f2851f4c8c73b3 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Mon, 5 May 2025 13:42:09 -0700 Subject: [PATCH] python3Packages.google-auth: build from source, add maintainer --- .../python-modules/google-auth/default.nix | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/google-auth/default.nix b/pkgs/development/python-modules/google-auth/default.nix index 33b582c6cfd4..5f53cf7c720e 100644 --- a/pkgs/development/python-modules/google-auth/default.nix +++ b/pkgs/development/python-modules/google-auth/default.nix @@ -1,12 +1,11 @@ { lib, - stdenv, + fetchFromGitHub, aiohttp, aioresponses, buildPythonPackage, cachetools, cryptography, - fetchPypi, flask, freezegun, grpcio, @@ -17,7 +16,6 @@ pytest-asyncio, pytest-localserver, pytestCheckHook, - pythonOlder, pyu2f, requests, responses, @@ -30,12 +28,11 @@ buildPythonPackage rec { version = "2.38.0"; pyproject = true; - disabled = pythonOlder "3.7"; - - src = fetchPypi { - pname = "google_auth"; - inherit version; - hash = "sha256-goURNgfTuAo/FUO3WWJEe6ign+hXg0MqeE/e72rAlMQ="; + src = fetchFromGitHub { + owner = "googleapis"; + repo = "google-auth-library-python"; + tag = "v${version}"; + hash = "sha256-XmAKlzld2a6dFag/49zmhXMS5WDnoDZKqkjmzLb+ZN0="; }; build-system = [ setuptools ]; @@ -79,6 +76,13 @@ buildPythonPackage rec { responses ] ++ lib.flatten (lib.attrValues optional-dependencies); + disabledTestPaths = [ + "samples/" + "system_tests/" + # Requires a running aiohttp event loop + "tests_async/" + ]; + pythonImportsCheck = [ "google.auth" "google.oauth2" @@ -91,7 +95,7 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; - meta = with lib; { + meta = { description = "Google Auth Python Library"; longDescription = '' This library simplifies using Google's various server-to-server @@ -99,7 +103,7 @@ buildPythonPackage rec { ''; 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 = [ ]; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.sarahec ]; }; }