summaryrefslogtreecommitdiff
path: root/dev-libs/tree-sitter-markdown/tree-sitter-markdown-0.5.3-r1.ebuild
blob: 2ffda4b67ecd1809f7c823bbc8fa50c58a5c46f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

TS_BINDINGS=( python )

DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{13..14} )
inherit distutils-r1 tree-sitter-grammar

DESCRIPTION="Markdown grammar for Tree-sitter"
HOMEPAGE="https://github.com/tree-sitter-grammars/tree-sitter-markdown"
SRC_URI="https://github.com/tree-sitter-grammars/tree-sitter-markdown/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"

RDEPEND="!dev-libs/tree-sitter-markdown-inline"

PATCHES=( "${FILESDIR}"/${P}-python.patch )

src_test() {
	pushd tree-sitter-markdown 2>/dev/null
	tree-sitter-grammar_src_test
	popd 2>/dev/null
	# Running the tests on markdown-inline requires extensions to be enabled, but
	# the parser generated by upstream does not include the extensions.
	# https://github.com/tree-sitter-grammars/tree-sitter-markdown/issues/136
	#cd ../tree-sitter-markdown-inline
	#tree-sitter-grammar_src_test

	use python && distutils-r1_src_test
}

python_test() {
	epytest bindings/python/tests
}