From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8A7DE1581FD for ; Thu, 11 Sep 2025 13:10:10 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 76431341646 for ; Thu, 11 Sep 2025 13:10:10 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 38AFF110377; Thu, 11 Sep 2025 13:09:47 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 327FA110377 for ; Thu, 11 Sep 2025 13:09:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CAE4A3412A0 for ; Thu, 11 Sep 2025 13:09:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 61715399F for ; Thu, 11 Sep 2025 13:09:43 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1757596174.90ee78ba59c8b57188d1d24f2cec9b9ddae97f04.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/git-review/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/git-review/Manifest dev-python/git-review/git-review-2.5.0.ebuild dev-python/git-review/git-review-9999.ebuild X-VCS-Directories: dev-python/git-review/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 90ee78ba59c8b57188d1d24f2cec9b9ddae97f04 X-VCS-Branch: master Date: Thu, 11 Sep 2025 13:09:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 52e331dc-9ada-483a-a0a9-d27d1fb5467c X-Archives-Hash: 127c61a84d7ea94a702b6a678d0a5924 commit: 90ee78ba59c8b57188d1d24f2cec9b9ddae97f04 Author: Michał Górny gentoo org> AuthorDate: Thu Sep 11 11:36:58 2025 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Sep 11 13:09:34 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90ee78ba dev-python/git-review: Bump to 2.5.0 Also enable tests. Closes: https://bugs.gentoo.org/785304 Signed-off-by: Michał Górny gentoo.org> dev-python/git-review/Manifest | 2 + dev-python/git-review/git-review-2.5.0.ebuild | 73 +++++++++++++++++++++++++++ dev-python/git-review/git-review-9999.ebuild | 46 ++++++++++++++--- 3 files changed, 114 insertions(+), 7 deletions(-) diff --git a/dev-python/git-review/Manifest b/dev-python/git-review/Manifest index 7a968f87e8a2..f935e4b2eb68 100644 --- a/dev-python/git-review/Manifest +++ b/dev-python/git-review/Manifest @@ -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 diff --git a/dev-python/git-review/git-review-2.5.0.ebuild b/dev-python/git-review/git-review-2.5.0.ebuild new file mode 100644 index 000000000000..fb8a2a2d4401 --- /dev/null +++ b/dev-python/git-review/git-review-2.5.0.ebuild @@ -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 +} diff --git a/dev-python/git-review/git-review-9999.ebuild b/dev-python/git-review/git-review-9999.ebuild index 13ccd01484a3..fb8a2a2d4401 100644 --- a/dev-python/git-review/git-review-9999.ebuild +++ b/dev-python/git-review/git-review-9999.ebuild @@ -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() {