From 9637b1269e53e480f0e55df70d8b5f5700200abf Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Thu, 22 May 2025 15:44:47 -0700 Subject: [PATCH 1/2] python3Packages.google-cloud-testutils: refactor Build from github repo, modernize, enable tests, and add maintainer --- .../google-cloud-testutils/default.nix | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/google-cloud-testutils/default.nix b/pkgs/development/python-modules/google-cloud-testutils/default.nix index c5b6f750cbb3..e1f04575aaf1 100644 --- a/pkgs/development/python-modules/google-cloud-testutils/default.nix +++ b/pkgs/development/python-modules/google-cloud-testutils/default.nix @@ -2,42 +2,45 @@ lib, buildPythonPackage, click, - fetchPypi, + fetchFromGitHub, google-auth, packaging, - pythonOlder, + pytestCheckHook, + setuptools, }: buildPythonPackage rec { pname = "google-cloud-testutils"; version = "1.6.0"; - format = "setuptools"; + pyproject = true; - disabled = pythonOlder "3.7"; - - src = fetchPypi { - pname = "google_cloud_testutils"; - inherit version; - hash = "sha256-wuCpUpc5Iny6MFoh7u9d175wL9DWHz4ZLM1f+DE+V6U="; + src = fetchFromGitHub { + owner = "googleapis"; + repo = "python-test-utils"; + tag = "v${version}"; + hash = "sha256-WxEFtYiWSl9ZmaduucdVpiCb2SUEVwUdY8jG8GHni7M="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ click google-auth packaging ]; - # does not contain tests - doCheck = false; + nativeCheckInputs = [ + pytestCheckHook + ]; pythonImportsCheck = [ "test_utils" ]; - meta = with lib; { + meta = { description = "System test utilities for google-cloud-python"; mainProgram = "lower-bound-checker"; homepage = "https://github.com/googleapis/python-test-utils"; changelog = "https://github.com/googleapis/python-test-utils/blob/v${version}/CHANGELOG.md"; - license = licenses.asl20; - maintainers = [ ]; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.sarahec ]; }; } From be67d3f77dde3ab95428de3a18d975b7045d6a73 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Thu, 22 May 2025 15:50:16 -0700 Subject: [PATCH 2/2] python3Packages.google-cloud-testutils: 1.6.0 -> 1.6.4 changelog: https://github.com/googleapis/python-test-utils/releases/tag/v1.6.4 diff: https://github.com/googleapis/python-test-utils/compare/v1.6.0...v1.6.4 --- .../python-modules/google-cloud-testutils/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/google-cloud-testutils/default.nix b/pkgs/development/python-modules/google-cloud-testutils/default.nix index e1f04575aaf1..7f22b14d12d3 100644 --- a/pkgs/development/python-modules/google-cloud-testutils/default.nix +++ b/pkgs/development/python-modules/google-cloud-testutils/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "google-cloud-testutils"; - version = "1.6.0"; + version = "1.6.4"; pyproject = true; src = fetchFromGitHub { owner = "googleapis"; repo = "python-test-utils"; tag = "v${version}"; - hash = "sha256-WxEFtYiWSl9ZmaduucdVpiCb2SUEVwUdY8jG8GHni7M="; + hash = "sha256-VTu/ElWZrSUrUBrfLPTBV4PMSQCRAyF9Ka7jKEqVzLk="; }; build-system = [ setuptools ]; @@ -39,7 +39,7 @@ buildPythonPackage rec { description = "System test utilities for google-cloud-python"; mainProgram = "lower-bound-checker"; homepage = "https://github.com/googleapis/python-test-utils"; - changelog = "https://github.com/googleapis/python-test-utils/blob/v${version}/CHANGELOG.md"; + changelog = "https://github.com/googleapis/python-test-utils/blob/${src.tag}/CHANGELOG.md"; license = lib.licenses.asl20; maintainers = [ lib.maintainers.sarahec ]; };