python3Packages.tree-sitter: remove unused test dependencies (#437833)

This commit is contained in:
Gaétan Lepage
2025-09-23 08:18:13 +00:00
committed by GitHub
2 changed files with 0 additions and 44 deletions
@@ -1,18 +1,10 @@
{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
# build-system
setuptools,
# tests
tree-sitter-python,
tree-sitter-rust,
tree-sitter-html,
tree-sitter-javascript,
tree-sitter-json,
}:
buildPythonPackage rec {
@@ -25,33 +17,10 @@ buildPythonPackage rec {
hash = "sha256-zXYa0OTR/IiksbgIO64G1PlzrPb18pu/E+qWCcHeycE=";
};
# see https://github.com/tree-sitter/py-tree-sitter/issues/330#issuecomment-2629403946
patches = lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [
./segfault-patch.diff
];
build-system = [ setuptools ];
nativeCheckInputs = [
tree-sitter-python
tree-sitter-rust
tree-sitter-html
tree-sitter-javascript
tree-sitter-json
];
pythonImportsCheck = [ "tree_sitter" ];
preCheck = ''
# https://github.com/NixOS/nixpkgs/issues/255262#issuecomment-1721265871
rm -r tree_sitter
'';
disabledTests = [
# test fails in nix sandbox
"test_dot_graphs"
];
meta = {
description = "Python bindings to the Tree-sitter parsing library";
homepage = "https://github.com/tree-sitter/py-tree-sitter";
@@ -1,13 +0,0 @@
--- i/tree_sitter/core/lib/src/parser.c
+++ w/tree_sitter/core/lib/src/parser.c
@@ -2084,6 +2084,10 @@ void ts_parser_reset(TSParser *self) {
self->parse_state = (TSParseState) {0};
}
+// FIXME: see tree-sitter/py-tree-sitter#330
+#if __GNUC__ >= 14 && defined(__aarch64__) && defined(__OPTIMIZE__) && !defined(__OPTIMIZE_SIZE__)
+__attribute__((optimize(2)))
+#endif
TSTree *ts_parser_parse(
TSParser *self,
const TSTree *old_tree,