From 48bc06f86159fce9a7a39b54370c1a92c8e8ec3a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 21 May 2025 09:00:44 +0200 Subject: [PATCH] python313Packages.google-pasta: refactor (#408329) - enable tests - add pythonImportsCheck --- .../python-modules/google-pasta/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/google-pasta/default.nix b/pkgs/development/python-modules/google-pasta/default.nix index d9692217a520..f252434b319e 100644 --- a/pkgs/development/python-modules/google-pasta/default.nix +++ b/pkgs/development/python-modules/google-pasta/default.nix @@ -2,17 +2,19 @@ lib, buildPythonPackage, fetchPypi, + pytestCheckHook, + setuptools, six, }: buildPythonPackage rec { pname = "google-pasta"; version = "0.2.0"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; - sha256 = "0vm1r1jlaiagj0l9yf7j6zn9w3733dr2169911c0svgrr3gwiwn9"; + hash = "sha256-yfLI38j5bQ1YCCmZIHIb4wye7DfyOJ8okE9FRWXIoW4="; }; postPatch = '' @@ -20,12 +22,17 @@ buildPythonPackage rec { --replace-fail assertRaisesRegexp assertRaisesRegex ''; - propagatedBuildInputs = [ six ]; + build-system = [ setuptools ]; + + dependencies = [ six ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "pasta" ]; meta = { description = "AST-based Python refactoring library"; homepage = "https://github.com/google/pasta"; - # Usually the tag message contains a one-line summary of the changes. changelog = "https://github.com/google/pasta/releases/tag/v${version}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ timokau ];