Fabian Affolter 48bc06f861
python313Packages.google-pasta: refactor (#408329)
- enable tests
- add pythonImportsCheck
2025-05-21 09:00:44 +02:00

41 lines
866 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
pytestCheckHook,
setuptools,
six,
}:
buildPythonPackage rec {
pname = "google-pasta";
version = "0.2.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-yfLI38j5bQ1YCCmZIHIb4wye7DfyOJ8okE9FRWXIoW4=";
};
postPatch = ''
substituteInPlace pasta/augment/inline_test.py \
--replace-fail assertRaisesRegexp assertRaisesRegex
'';
build-system = [ setuptools ];
dependencies = [ six ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "pasta" ];
meta = {
description = "AST-based Python refactoring library";
homepage = "https://github.com/google/pasta";
changelog = "https://github.com/google/pasta/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ timokau ];
};
}