summaryrefslogtreecommitdiff
path: root/dev-python/tree-sitter
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-18 00:01:42 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-18 00:01:42 +0100
commit075fd1f8cabc5879c6eb42127fb84c3058677fde (patch)
tree8b761e85416656264e041b1954427a58894b3333 /dev-python/tree-sitter
parent6c9dc10e04cd513437e046ccca0e51a3d6d4dc7c (diff)
gentoo auto-resync : 18:05:2024 - 00:01:41
Diffstat (limited to 'dev-python/tree-sitter')
-rw-r--r--dev-python/tree-sitter/Manifest3
-rw-r--r--dev-python/tree-sitter/files/tree-sitter-0.22.2-unbundle.patch23
-rw-r--r--dev-python/tree-sitter/tree-sitter-0.22.2.ebuild58
3 files changed, 84 insertions, 0 deletions
diff --git a/dev-python/tree-sitter/Manifest b/dev-python/tree-sitter/Manifest
index 12bae3bd00bd..bf76af2646dc 100644
--- a/dev-python/tree-sitter/Manifest
+++ b/dev-python/tree-sitter/Manifest
@@ -1,8 +1,10 @@
AUX tree-sitter-0.19.0_p20210506-unbundle.patch 674 BLAKE2B 3b7f4efb2a0064c6682b40373c5c3d53107a5f31acbb71fa45c693511eb2efe14e798d65316435ff79d0c81412345484330d31a5ab79541d688f83e3ff3a0bbc SHA512 bdc2d9341abe62ca2fd34b847f8942e9747082d800bc152e17330b04d89b6f36e92ff1868b2ea79684ded038295c8593129a4779dfdb0b12587acd8d8e891a05
AUX tree-sitter-0.21.0-unbundle.patch 516 BLAKE2B 9bee97b5563088af7ff31aaa9da2e2a0a5ddb54b84d5520994df5a6e9e8472e166ce50c23c7c77e1f495cc3139a532c710dc95e17c5ddcb35c56072538931a99 SHA512 9a583f4c4eb614afb7e6d6961cdf0390a0d45f54b0860a59fe6f2dc4fe0fdce0767fb2c5bd809ffc5aa7ce153c79b162dcbb41e05e0d7540614ab23da5889c74
+AUX tree-sitter-0.22.2-unbundle.patch 819 BLAKE2B 2190f524ad43240e90269ef475a7290948080d99bf49e0431c0334affa902a4aa6682f9ad723862722606ebf76988089c22adbbcba7d01024a93e96c438dbadc SHA512 4fd8e0b642277c7ea44dfd93d4c4bff46ce8f11cae558d7c5ad189fa69d9676949bd8aff3c468b2fdae4e74a63c08e96f2e1bf8152c58380b2bc66971079fdd2
DIST tree-sitter-0.20.1.gh.tar.gz 22013 BLAKE2B 961619ab28b71c4051708695f245246e9c9197987c3ce7f162c87af1cfeb2ae378301cce160c071d4df872124274c7984bcaf938c611a91f45515c44cea53e5a SHA512 d6db28fcfb0ea46840ae863a625ef1d8794015b147137e8ef1e113ea6d04e2b87a3bd44dcabe6e41a65230b8da09ce0563a5d9d5aeac30d279547a9085720da3
DIST tree-sitter-0.21.0.gh.tar.gz 38263 BLAKE2B 27c1b52c40e94368c66e222fbc1f5e64734d7d9243e0b76d9607edebaee80211f228323db23cd83c6bc338e7d933a28be8eff13f7ee49495c282d8e9afed4bfb SHA512 f62896edebcb305d1216e540d4a10a2622228b12b1f969dd9722e2d56615f05aea4e681b6d933beaeed52ce59d36641c80c9a4a1ac79b038fb2a75e079987231
DIST tree-sitter-0.21.3.gh.tar.gz 38504 BLAKE2B dd8ed0047763d92babbdb3fd34a6fe6b7a9299b99067600f473bf16b9754a98ada141d96f9b6b26abcb2ff178dd4ec34da547c9cdb7b3449f7b98a44ad10476e SHA512 61f3d4cb15a4106eb350be2adc6ad39de31bd5b2656f35acf2cdf828ababac37b6197d5565ee74b0b2c3a161619163bb98c38108ca3db616fee633e6e2a835a7
+DIST tree-sitter-0.22.2.gh.tar.gz 166150 BLAKE2B eac9a3fe75e56feffcf32e4bd59269c3e1adccaaf9127e9668bb65fef6eb1b1d1cd56ecb8bfb58810e0d9a0d182ce2844c7b350ebbe6b3d4a713a33dc64af953 SHA512 707a6d9f15ab9382e43341d6be68465f4f0bb6cbb9603bf6dfd51628e71db62cb365e1a0a6836250428fa5e8bc66b6cda5992083717778ccc06e825fb3f23728
DIST tree-sitter-embedded-template-6d791b897ecda59baa0689a85a9906348a2a6414.tar.gz 12420 BLAKE2B 9b9c6dd135cef4490e145657c5eeeb1fd470faee3846007638d8247daf07227029c6e7e323a0ed30c5cf6d35602be6bfb62dc1c22076fd4a0e76b161d55cca38 SHA512 7744852711cb1659607298fa373ce3ef79de3212ff55c0fb4e9aebcb715548934065ee3b5b12e9d08169a6207879e154a94c9de8bff892c32729c35d49964736
DIST tree-sitter-html-b5d9758e22b4d3d25704b72526670759a9e4d195.tar.gz 26609 BLAKE2B 223fe82ea18bf61b2b7ec664ad68ec1f324c9e0a1c78578db6063b9037c62be2bb762a9e47d0af81f7f244889f1f72683da3751c1d1c609c4a27fdcd0dc008b8 SHA512 15fd961c18d55a20487f48ef6a6f1822f9033baba8995f2e00cf8db1750036d69e19607f578fe90676aab30a173874969c69b91605b6073eb298f32f5f24f81d
DIST tree-sitter-javascript-0.19.0.tar.gz 257637 BLAKE2B dc28bcbb003d623f5930dbf575f94f51c00eb008a77ba080f05e730fae63fb24d29c02ebb62d179a59d0f9cb8a02dbd3971440f299d952b1ec29b25bc6d21e34 SHA512 ef842787742e76d2534528ec710800df91958feaa4ba351558b5315f58a4bd85c729d088d139e15e0395726a690a97c05e03846c9176af0fd482777ae57087ed
@@ -14,4 +16,5 @@ DIST tree-sitter-rust-3a56481f8d13b6874a28752502a58520b9139dc7.tar.gz 419237 BLA
EBUILD tree-sitter-0.20.1-r1.ebuild 1472 BLAKE2B bfcd5ebcb8b1a1a1e799de1918da3c786e8da7e6a729f0054c1e49c0e0fdf273d58522896b54b385cea4733fefea5c01f39261de90156ef7dfd7a9503eb225a1 SHA512 2f9a69474f454d0e24e669f6bffc577ce5073cc20e8d8c3e609d048e8ef9e4eeaa6d3c8a39b3b9c066f8a67598aaf6171fb414cf20088f12d685127c515ddb5f
EBUILD tree-sitter-0.21.0-r1.ebuild 1973 BLAKE2B 70a9e109defdd73ae48095eb78d71736913358882aa9598fddad0cd2fd24b51848293e968c73ae9638a7395420b3873dd377d4075ef91b1dc50e7f3285cafdc8 SHA512 0ed1bc400cfc8854c3379ad1d94d9ff4b555d4bd2fbbcbf822048e93dbd358a5a76d394d11c79dc17e964abf8e703364ea1d3c55d9af431d182aa26c35cc28ed
EBUILD tree-sitter-0.21.3.ebuild 1981 BLAKE2B dc55662ac169854a85d177ac9d23007ed9c4bb52e10e8729da68991b9e7d5d70df5979b008e88052d01072f4655e0f419879b28653faee49f79b41185b3ab5ce SHA512 2a1de2831590e26cee3b053799cf32b228e33726bd0cc83d0cc619f237ac04d605f4240e382891f468818ecd8d6558b50f822ee7305417d9172cbf3f891e6c43
+EBUILD tree-sitter-0.22.2.ebuild 1309 BLAKE2B 764132e06e3c57afd36b2605cffdc94e300997d451b07a813d2b58f5793acdba0e541d8fccf576d0dce307453bb649cfcac8563c9d029eeb28de7ee37ae59322 SHA512 e37151c4057ddbc69039e2563ff0b2f0e266032f4d6286f903e71143c41a027716740072ad598e9e7c1fff6d43f47420ecbc561aa4eaed0af2ad494d45044afc
MISC metadata.xml 502 BLAKE2B cad33788db5ede6c0c2ea8dd8b80da09f2f8ccac8d77a1a18d65ba639a91eb9d8a89036a52886777024c4a6dc8775993beeb6eaa790562d698123e5b5b261435 SHA512 fb56c5f39e390363c8a3c80bddff9babcf30c74b86192234153f03ba62e21f1a05b1db925e51a3f4b7876a61a606b051a5314f5475d4ba7092a3f89696a78ac3
diff --git a/dev-python/tree-sitter/files/tree-sitter-0.22.2-unbundle.patch b/dev-python/tree-sitter/files/tree-sitter-0.22.2-unbundle.patch
new file mode 100644
index 000000000000..d919b1abf008
--- /dev/null
+++ b/dev-python/tree-sitter/files/tree-sitter-0.22.2-unbundle.patch
@@ -0,0 +1,23 @@
+diff --git a/setup.py b/setup.py
+index 77ea76a..ab22ad3 100644
+--- a/setup.py
++++ b/setup.py
+@@ -12,7 +12,6 @@ setup(
+ Extension(
+ name="tree_sitter._binding",
+ sources=[
+- "tree_sitter/core/lib/src/lib.c",
+ "tree_sitter/binding/language.c",
+ "tree_sitter/binding/lookahead_iterator.c",
+ "tree_sitter/binding/lookahead_names_iterator.c",
+@@ -26,9 +25,8 @@ setup(
+ ],
+ include_dirs=[
+ "tree_sitter/binding",
+- "tree_sitter/core/lib/include",
+- "tree_sitter/core/lib/src",
+ ],
++ libraries=["tree-sitter"],
+ define_macros=[
+ ("PY_SSIZE_T_CLEAN", None),
+ ("TREE_SITTER_HIDE_SYMBOLS", None),
diff --git a/dev-python/tree-sitter/tree-sitter-0.22.2.ebuild b/dev-python/tree-sitter/tree-sitter-0.22.2.ebuild
new file mode 100644
index 000000000000..85c88a0273ea
--- /dev/null
+++ b/dev-python/tree-sitter/tree-sitter-0.22.2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python bindings to the Tree-sitter parsing library"
+HOMEPAGE="
+ https://github.com/tree-sitter/py-tree-sitter/
+ https://pypi.org/project/tree-sitter/
+"
+SRC_URI="
+ https://github.com/tree-sitter/py-tree-sitter/archive/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+S=${WORKDIR}/py-${P}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~s390"
+
+# setuptools is needed for distutils import
+DEPEND=">=dev-libs/tree-sitter-0.22.1:="
+RDEPEND="${DEPEND}
+ $(python_gen_cond_dep '
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ' 3.12)
+"
+BDEPEND="
+ test? (
+ >=dev-libs/tree-sitter-html-0.20.3[python,${PYTHON_USEDEP}]
+ >=dev-libs/tree-sitter-javascript-0.21.0[python,${PYTHON_USEDEP}]
+ >=dev-libs/tree-sitter-json-0.20.3[python,${PYTHON_USEDEP}]
+ >=dev-libs/tree-sitter-python-0.21.0[python,${PYTHON_USEDEP}]
+ >=dev-libs/tree-sitter-rust-0.21.2[python,${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/tree-sitter-0.22.2-unbundle.patch
+)
+
+src_unpack() {
+ default
+ rmdir "${S}/tree_sitter/core" || die
+}
+
+src_test() {
+ rm -r tree_sitter || die
+ distutils-r1_src_test
+}