{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
tree-sitter,
}:
buildPythonPackage rec {
pname = "tree-sitter-python";
version = "0.23.2";
pyproject = true;
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-python";
rev = "v${version}";
hash = "sha256-cOBG2xfFJ0PpR1RIKW1GeeNeOBA9DAP/N4RXRGYp3yw=";
};
build-system = [
setuptools
];
optional-dependencies = {
core = [
tree-sitter
# There are no tests
doCheck = false;
pythonImportsCheck = [ "tree_sitter_python" ];
meta = with lib; {
description = "Python grammar for tree-sitter";
homepage = "https://github.com/tree-sitter/tree-sitter-python";
license = licenses.mit;
maintainers = with maintainers; [ doronbehar ];
}