diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2024-08-28 10:30:13 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-08-28 10:58:56 +0300 |
commit | b2704e5bae4d01f3b642a76d32a785d48308a60f (patch) | |
tree | c64fe3fcfe9e23bd47f52ac4b3b1fc6983b09cc9 /dev-python/tree-sitter | |
parent | dev-util/tree-sitter-cli: add 0.23.0 (diff) | |
download | gentoo-b2704e5bae4d01f3b642a76d32a785d48308a60f.tar.gz gentoo-b2704e5bae4d01f3b642a76d32a785d48308a60f.tar.bz2 gentoo-b2704e5bae4d01f3b642a76d32a785d48308a60f.zip |
dev-python/tree-sitter: add 0.23.0
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/tree-sitter')
-rw-r--r-- | dev-python/tree-sitter/Manifest | 1 | ||||
-rw-r--r-- | dev-python/tree-sitter/tree-sitter-0.23.0.ebuild | 64 |
2 files changed, 65 insertions, 0 deletions
diff --git a/dev-python/tree-sitter/Manifest b/dev-python/tree-sitter/Manifest index 32ba7543cb3c..2cbbb592013b 100644 --- a/dev-python/tree-sitter/Manifest +++ b/dev-python/tree-sitter/Manifest @@ -1,5 +1,6 @@ DIST tree-sitter-0.21.3.gh.tar.gz 38504 BLAKE2B dd8ed0047763d92babbdb3fd34a6fe6b7a9299b99067600f473bf16b9754a98ada141d96f9b6b26abcb2ff178dd4ec34da547c9cdb7b3449f7b98a44ad10476e SHA512 61f3d4cb15a4106eb350be2adc6ad39de31bd5b2656f35acf2cdf828ababac37b6197d5565ee74b0b2c3a161619163bb98c38108ca3db616fee633e6e2a835a7 DIST tree-sitter-0.22.3.gh.tar.gz 164914 BLAKE2B 7ab97203fed17fc8d18c40d5a24ff60cea4757353a4124c832cc52bff93ed8af913dbbab682225eac309762a26e90c216d2e1058dcaeb860ebd467b4c9655939 SHA512 8ac729b90f942eef07de97c4ebd070c1040f338c1f57a2203b6aa4f3f8db863fdb5183c9b27d5be2ec270d7eefba7665800d6cc4e9265cbd4b4715af4c4d3921 +DIST tree-sitter-0.23.0.gh.tar.gz 167761 BLAKE2B 694e90f608f51fe4f9add476cd5ebcd0ce04a7b027efc4948ce49a6cc0f05ebf4f15e0fe3f365f89f3e04cfec542cb3f1db1e5b05ff7ca23d3134561ea3dcf36 SHA512 67a6f3359c6283c58afcdbe5b6a521cdfcf2585a5361fb69a55eff82941726a143528a402e6d609286d8846c77e20d0a38551525d761e35abb21045ad9c5a2f8 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-de1e682289a417354df5b4437a3e4f92e0722a0f.tar.gz 396570 BLAKE2B d80cecb070bd1c82737ee1d38fff293ac4c96fde02563ecc910d30c920b902bd5c25a7ac50585f8cb7a26203d98f4a9e6feeebd4ac0d54bede9486ff642e03be SHA512 4a509a886ebeae0d960360113aff89fb56090f1fe4bb5a7866952736a04838a8b6421cc7d19473acc48b135bca4615325c59c0f0f7f3734f23a78fff9cc2050e diff --git a/dev-python/tree-sitter/tree-sitter-0.23.0.ebuild b/dev-python/tree-sitter/tree-sitter-0.23.0.ebuild new file mode 100644 index 000000000000..e92fdc14a478 --- /dev/null +++ b/dev-python/tree-sitter/tree-sitter-0.23.0.ebuild @@ -0,0 +1,64 @@ +# 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..13} ) + +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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + +# setuptools is needed for distutils import +DEPEND=">=dev-libs/tree-sitter-0.23.0:=" +RDEPEND="${DEPEND} + $(python_gen_cond_dep ' + dev-python/setuptools[${PYTHON_USEDEP}] + ' 3.12) +" +BDEPEND=" + test? ( + >=dev-libs/tree-sitter-html-0.20.4[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.23.0[python,${PYTHON_USEDEP}] + >=dev-libs/tree-sitter-rust-0.21.2[python,${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${PN}-0.22.2-unbundle.patch +) + +src_unpack() { + default + rmdir "${S}/tree_sitter/core" || die +} + +src_prepare() { + default + + sed -i tree_sitter/binding/query.c -e 's/_PyErr_FormatFromCause/PyErr_Format/' || die +} + +src_test() { + rm -r tree_sitter || die + distutils-r1_src_test +} |