summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2024-06-08 11:19:53 +0200
committerHans de Graaff <graaff@gentoo.org>2024-06-08 11:22:34 +0200
commit6ef0aeb8429448aadd1827918c71bb33224ea586 (patch)
treea5df4ce82dd8990f11ee01e6d55419889a178825 /dev-util/rbtools
parentdev-python/housekeeping: new package, add 1.1 (diff)
downloadgentoo-6ef0aeb8429448aadd1827918c71bb33224ea586.tar.gz
gentoo-6ef0aeb8429448aadd1827918c71bb33224ea586.tar.bz2
gentoo-6ef0aeb8429448aadd1827918c71bb33224ea586.zip
dev-util/rbtools: add 5.0
Closes: https://bugs.gentoo.org/929547 Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-util/rbtools')
-rw-r--r--dev-util/rbtools/Manifest1
-rw-r--r--dev-util/rbtools/files/rbtools-5.0-importlib-resources.patch14
-rw-r--r--dev-util/rbtools/rbtools-5.0.ebuild57
3 files changed, 72 insertions, 0 deletions
diff --git a/dev-util/rbtools/Manifest b/dev-util/rbtools/Manifest
index 58e5535b93b2..d508f2d39112 100644
--- a/dev-util/rbtools/Manifest
+++ b/dev-util/rbtools/Manifest
@@ -1 +1,2 @@
DIST rbtools-4.1.tar.gz 619541 BLAKE2B 9b1aeca4f139a0189affb873363dba8f6d13eb954d4872939c543f6d91c00b09b2452cc379d4d99450c05d3d44a1996e910ff512ba9849292a7b705ce01be654 SHA512 58aa58ce6c55d4d3be9f221c493c8a3c15537776ff4e28be1ea44c0441f1dd9877ac9145066fdceb90d392c75cf29ec80e7efd154b0a2f1893422b65a0189ea0
+DIST rbtools-5.0.tar.gz 649338 BLAKE2B c6a08004e7c8ba17936865e53b78e086ec74e8f5fee7ecc124750f3bf24b9b52ab8a26d1caa7010cdd2822463fcb27b8e5c5f757068924e22d3e59268166f7bf SHA512 7fbc5198fc89ee911a3cc487ead094d46213cfc4f85ab01cf22bd2a628559acdaaed138b430b08aa94ea25dec1179bf7c28349ac8226d632a6112ec83e2b57b7
diff --git a/dev-util/rbtools/files/rbtools-5.0-importlib-resources.patch b/dev-util/rbtools/files/rbtools-5.0-importlib-resources.patch
new file mode 100644
index 000000000000..fa23c587a77a
--- /dev/null
+++ b/dev-util/rbtools/files/rbtools-5.0-importlib-resources.patch
@@ -0,0 +1,14 @@
+--- a/rbtools/commands/setup_completion.py 2024-06-06 10:51:45.000000000 +0200
++++ b/rbtools/commands/setup_completion.py 2024-06-08 11:12:34.788309950 +0200
+@@ -6,7 +6,10 @@
+ import sys
+ from typing import Optional
+
+-import importlib_resources
++try:
++ import importlib.resources as importlib_resources
++except ImportError:
++ import importlib_resources
+
+ from rbtools.commands.base import BaseCommand, CommandError
+
diff --git a/dev-util/rbtools/rbtools-5.0.ebuild b/dev-util/rbtools/rbtools-5.0.ebuild
new file mode 100644
index 000000000000..387a3a4f1ff9
--- /dev/null
+++ b/dev-util/rbtools/rbtools-5.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="Command line tools for use with Review Board"
+HOMEPAGE="https://www.reviewboard.org/"
+SRC_URI="https://github.com/reviewboard/rbtools/archive/refs/tags/release-${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/rbtools-release-${PV}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="
+ >=dev-python/certifi-2023.5.7[${PYTHON_USEDEP}]
+ dev-python/colorama[${PYTHON_USEDEP}]
+ >=dev-python/housekeeping-1.1[${PYTHON_USEDEP}]
+ =dev-python/housekeeping-1*[${PYTHON_USEDEP}]
+ >=dev-python/packaging-21.3[${PYTHON_USEDEP}]
+ =dev-python/pydiffx-1.1*[${PYTHON_USEDEP}]
+ dev-python/texttable[${PYTHON_USEDEP}]
+ >=dev-python/typing-extensions-4.3.0[${PYTHON_USEDEP}]
+ dev-python/tqdm[${PYTHON_USEDEP}]
+ >=dev-python/importlib-metadata-5.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ >=dev-python/kgb-6.1[${PYTHON_USEDEP}]
+ dev-python/pytest-env[${PYTHON_USEDEP}]
+ dev-vcs/git
+ dev-vcs/mercurial
+ )
+"
+
+PATCHES=( "${FILESDIR}/${P}-importlib-resources.patch" )
+
+DOCS=( AUTHORS NEWS README.md )
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ default
+
+ # Avoid tests requiring unpackaged test data
+ rm -f rbtools/clients/tests/test_scanning.py || die
+
+ # Avoid repository specific tests to avoid dependencies on them
+ rm -f rbtools/clients/tests/test_{cvs,git,mercurial,svn}.py || die
+}