mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-17 14:49:30 -07:00
dev-python/git-review: Bump to 2.5.0
Also enable tests. Closes: https://bugs.gentoo.org/785304 Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -1 +1,3 @@
|
||||
DIST gerrit-3.4.4.war 79323317 BLAKE2B 4473e5eef14e8b741a998470a193340c62eb09f239a9ca5bf7372b15638fb2914bbc605b92722221f19ded088bbf2237eb25055217ff1b79e7a0334e9a1feb0b SHA512 bb7d54585d16a3a4c2660d1e4cdfe193164f4f18e24a2d5df147936023a237332b1c1e1e21198c2f4216935e37fd3dc1494a0c1aa41c6dcf6b966f19c9f976ce
|
||||
DIST git-review-2.4.0.tar.gz 70859 BLAKE2B afe7da3e7efd3c26f55beb102f0961607d818dcdba47beef4f94bf4cbe67bfcdad7cd14bbe6767902f694844ebe94c2b547e9dc4f55f4b0c94e9b292913c3b98 SHA512 24b8b4813933a53158eacaff8b336da1e7c948377cd147487cfccab81c7211c55f8aa8348998bfdf161b4bb9ed107aaa841b643d045498690f75fa18be0aae1f
|
||||
DIST git_review-2.5.0.tar.gz 72645 BLAKE2B 55560537d8871e21b264aaddfdeea88cad5941f74fcf09cd6cd857d9aea928c2891367734dff849eca2c1c4da987750c2e092e5fe72c9b82b679b3f8eab959f1 SHA512 568590dbdd97b450341eb76fa3f8da7c7d4f74960221bd4e778cc67b7ef8fb314482da7eb79f2609d9ffa541ac420ed6816fa21b0b685a2ce0037501efae58ac
|
||||
|
||||
73
dev-python/git-review/git-review-2.5.0.ebuild
Normal file
73
dev-python/git-review/git-review-2.5.0.ebuild
Normal file
@@ -0,0 +1,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
|
||||
}
|
||||
@@ -1,14 +1,15 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYPI_NO_NORMALIZE=1
|
||||
PYTHON_COMPAT=( python3_{9..12} )
|
||||
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
|
||||
@@ -18,20 +19,51 @@ 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"
|
||||
|
||||
BDEPEND="
|
||||
>=dev-python/pbr-4.1.0[${PYTHON_USEDEP}]
|
||||
"
|
||||
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() {
|
||||
sed -i -e '/manpages/,+1d' setup.cfg || die
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user