blob: fb8a2a2d4401802ae1baa1cc5028f12344588b73 (
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} )
inherit distutils-r1
# see DEFAULT_WAR_URL in tests/__init__.py
GERRIT_PV=3.4.4
DESCRIPTION="Tool to submit code to Gerrit"
HOMEPAGE="https://git.openstack.org/cgit/openstack-infra/git-review"
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://opendev.org/opendev/${PN}.git"
else
inherit pypi
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
fi
SRC_URI+="
test? (
https://gerrit-releases.storage.googleapis.com/gerrit-${GERRIT_PV}.war
)
"
LICENSE="Apache-2.0"
SLOT="0"
RDEPEND="
>=dev-python/requests-1.1[${PYTHON_USEDEP}]
"
BDEPEND="
>=dev-python/pbr-4.1.0[${PYTHON_USEDEP}]
test? (
virtual/jre:*
)
"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
python_prepare_all() {
distutils-r1_python_prepare_all
sed -i -e '/manpages/,+1d' setup.cfg || die
if use test; then
mkdir .gerrit || die
cp "${DISTDIR}/gerrit-${GERRIT_PV}.war" .gerrit/ || die
fi
}
python_test() {
local EPYTEST_DESELECT=(
# changed message in git
git_review/tests/test_git_review.py::GitReviewTestCase::test_need_rebase_no_upload
git_review/tests/test_git_review.py::HttpGitReviewTestCase::test_need_rebase_no_upload
git_review/tests/test_git_review.py::PushUrlTestCase::test_need_rebase_no_upload
)
if [[ ! -d .gerrit/golden_site ]]; then
"${EPYTHON}" -m git_review.tests.prepare || die
git init || die
fi
epytest
}
python_install_all() {
doman git-review.1
distutils-r1_python_install_all
}
|