diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2022-09-09 09:32:45 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2022-09-09 10:22:54 +0300 |
commit | c75a36d0b51a4cfdacdffaaf869facc5d500a51f (patch) | |
tree | d2c55881db38485f029f63ff181b9d98c3084ada /dev-python/tree-sitter | |
parent | dev-python/translate-toolkit: add 3.7.3 (diff) | |
download | gentoo-c75a36d0b51a4cfdacdffaaf869facc5d500a51f.tar.gz gentoo-c75a36d0b51a4cfdacdffaaf869facc5d500a51f.tar.bz2 gentoo-c75a36d0b51a4cfdacdffaaf869facc5d500a51f.zip |
dev-python/tree-sitter: add 0.20.1
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.20.1.ebuild | 59 |
2 files changed, 60 insertions, 0 deletions
diff --git a/dev-python/tree-sitter/Manifest b/dev-python/tree-sitter/Manifest index 573505a8fd88..38fd6153cd8b 100644 --- a/dev-python/tree-sitter/Manifest +++ b/dev-python/tree-sitter/Manifest @@ -1,3 +1,4 @@ DIST py-tree-sitter-4f39f6919ca3be8efb420a338fd2cf9b8b68b156.tar.gz 14075 BLAKE2B b9a7a2247114c34e211f5098f04c456b25a3aee6cfde6d75bdd83427a379c5f339f1e897a3246ef7dafb2b512442bd0e7da18f391bc8283545e060dd00481421 SHA512 21629a147cda0c95a054c31223b082afa2d12491fee7a0d720187e5c390d9771c2e9b7d85fd35a56a2cf97a7addfa5332b58b3a36893aab2d7487f9522c5cddc +DIST tree-sitter-0.20.1.gh.tar.gz 22013 BLAKE2B 961619ab28b71c4051708695f245246e9c9197987c3ce7f162c87af1cfeb2ae378301cce160c071d4df872124274c7984bcaf938c611a91f45515c44cea53e5a SHA512 d6db28fcfb0ea46840ae863a625ef1d8794015b147137e8ef1e113ea6d04e2b87a3bd44dcabe6e41a65230b8da09ce0563a5d9d5aeac30d279547a9085720da3 DIST tree-sitter-javascript-0.19.0.tar.gz 257637 BLAKE2B dc28bcbb003d623f5930dbf575f94f51c00eb008a77ba080f05e730fae63fb24d29c02ebb62d179a59d0f9cb8a02dbd3971440f299d952b1ec29b25bc6d21e34 SHA512 ef842787742e76d2534528ec710800df91958feaa4ba351558b5315f58a4bd85c729d088d139e15e0395726a690a97c05e03846c9176af0fd482777ae57087ed DIST tree-sitter-python-0.19.0.tar.gz 129336 BLAKE2B 8a37b0d74ab89aa56d7164bd38ac527b7b9676cafd8f53faaee3d10316f91decd30c02078b1bb785a474615ae58e6edba1b28bc3311e6ff094435e5f53d64cd6 SHA512 df7c72f988a62af0774df1b3a60c86397725aaeb1e2ffaa9b1295ab22eec09bffaf391cad20fb0d08a20914b22af430c2248c26cad179fd68c9f2b32419c0b60 diff --git a/dev-python/tree-sitter/tree-sitter-0.20.1.ebuild b/dev-python/tree-sitter/tree-sitter-0.20.1.ebuild new file mode 100644 index 000000000000..8def3fa457ed --- /dev/null +++ b/dev-python/tree-sitter/tree-sitter-0.20.1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8..11} ) + +inherit distutils-r1 + +FIXTURE_PV=0.19.0 + +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 + test? ( + https://github.com/tree-sitter/tree-sitter-javascript/archive/v${FIXTURE_PV}.tar.gz + -> tree-sitter-javascript-${FIXTURE_PV}.tar.gz + https://github.com/tree-sitter/tree-sitter-python/archive/v${FIXTURE_PV}.tar.gz + -> tree-sitter-python-${FIXTURE_PV}.tar.gz + ) +" +S=${WORKDIR}/py-${P} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" + +RDEPEND="dev-libs/tree-sitter:=" +DEPEND="${RDEPEND}" + +distutils_enable_tests unittest + +PATCHES=( + "${FILESDIR}"/tree-sitter-0.19.0_p20210506-unbundle.patch +) + +src_unpack() { + default + rmdir "${S}/tree_sitter/core" || die + + if use test; then + mkdir "${S}/tests/fixtures" || die + local f + for f in tree-sitter-{javascript,python}; do + mv "${f}-${FIXTURE_PV}" "${S}/tests/fixtures/${f}" || die + done + fi +} + +src_test() { + rm -r tree_sitter || die + distutils-r1_src_test +} |