summaryrefslogtreecommitdiff
path: root/dev-python/lsprotocol/lsprotocol-2025.0.0-r1.ebuild
blob: db1e4f96fe4961a12060c13ad48f3e5adc173d86 (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
42
43
44
45
46
47
48
49
50
51
52
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{13..14} )

inherit edo distutils-r1

DESCRIPTION="Language Server Protocol types code generator packages"
HOMEPAGE="
	https://github.com/microsoft/lsprotocol
	https://pypi.org/project/lsprotocol/
"
# no tests in sdist
SRC_URI="
	https://github.com/microsoft/lsprotocol/archive/refs/tags/${PV}.tar.gz
		-> ${P}.gh.tar.gz
"
S="${S}/packages/python"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64"

RDEPEND="
	dev-python/attrs[${PYTHON_USEDEP}]
	dev-python/cattrs[${PYTHON_USEDEP}]
"
BDEPEND="
	test? (
		dev-python/pyhamcrest[${PYTHON_USEDEP}]
	)
"

EPYTEST_PLUGINS=()
distutils_enable_tests pytest

PATCHES=(
	"${FILESDIR}"/lsprotocol-2025.0.0-fix-against-cattrs-25.0.0.patch
)

src_prepare() {
	pushd "${WORKDIR}/${P}" >/dev/null || die
	default
	popd >/dev/null || die
}

python_test() {
	epytest ../../tests/python
}