repo/gentoo:master commit in: dev-python/cmd2/

Michał Górny <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786069741.be291af1ea0071d29fc1bc64254038778826c208.mgorny@gentoo>
commit:     be291af1ea0071d29fc1bc64254038778826c208
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  7 02:05:34 2026 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Aug  7 02:29:01 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be291af1

dev-python/cmd2: Bump to 4.2.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/cmd2/Manifest          |  1 +
 dev-python/cmd2/cmd2-4.2.0.ebuild | 59 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/dev-python/cmd2/Manifest b/dev-python/cmd2/Manifest
index 245ac12cb33b..6c517168d2c6 100644
--- a/dev-python/cmd2/Manifest
+++ b/dev-python/cmd2/Manifest
@@ -1,2 +1,3 @@
 DIST cmd2-4.0.0.tar.gz 813155 BLAKE2B b9b61d8a2e302f2acaee8420077f48d92728e910a73bbba9195600ed1dc7c4695abcdec5f0a08928798d24f83b333de076bc9f7d4c281c5cd502d1fd05be752b SHA512 a1df4bb215a098e2902826ff4686ec10664a4b9d8e0433c6103ba395f325ae56d8c4fa2d83d770b4cc9e4c1e5b456fa03a6bac6af9b7f8398a5fc61394cf15f7
 DIST cmd2-4.1.2.tar.gz 848904 BLAKE2B 515fb26b4df87be2d646ca2fbaf8b26acddb2f79b5a5117b9acdabec242153e3e33fdc3262dfe00c71280f1636faae3d39d7c44a0d6bdf2ed4b91b74acf2a27b SHA512 116bae054877a1d96d7f2c7399460b212e772f33b62f69aa60e24008452f7d2ae7b801c669da4fdf80b7153df2a60796c91732e7348b19bfea22dca343453efa
+DIST cmd2-4.2.0.tar.gz 852188 BLAKE2B 651d0aabb2ae5072a04698cbfa06dac205dbe33ab63df5f738d02893df79162f6e5c8c051d4546e6c1750ee22c35cc5c23692417c3da3d693c994c1dc06480ca SHA512 aa26d590a203ac41f7cf89f430a5fac35eed2491a6a86383508883cd4f42a51758cf6cb195b090920fe2e4322687c179aab17bac63e16a013411a9f8f75b5e71

diff --git a/dev-python/cmd2/cmd2-4.2.0.ebuild b/dev-python/cmd2/cmd2-4.2.0.ebuild
new file mode 100644
index 000000000000..d376ffa2a2dd
--- /dev/null
+++ b/dev-python/cmd2/cmd2-4.2.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{12..15} )
+
+inherit distutils-r1 optfeature virtualx pypi
+
+DESCRIPTION="Extra features for standard library's cmd module"
+HOMEPAGE="
+	https://github.com/python-cmd2/cmd2/
+	https://pypi.org/project/cmd2/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc64 ~riscv ~s390 ~x86"
+
+RDEPEND="
+	>=dev-python/prompt-toolkit-3.0.53[${PYTHON_USEDEP}]
+	>=dev-python/pyperclip-1.8.2[${PYTHON_USEDEP}]
+	>=dev-python/rich-15.0.0[${PYTHON_USEDEP}]
+	>=dev-python/rich-argparse-1.7.2[${PYTHON_USEDEP}]
+"
+# pyperclip uses clipboard backends in the following preference order:
+# pygtk, xclip, xsel, klipper, qtpy, pyqt5, pyqt4.
+# klipper is known to be broken in Xvfb, and therefore causes test
+# failures.  to avoid them, we must ensure that one of the backends
+# preferred to it is available (i.e. xclip or xsel).
+BDEPEND="
+	dev-python/setuptools-scm[${PYTHON_USEDEP}]
+	test? (
+		|| (
+			x11-misc/xclip
+			x11-misc/xsel
+		)
+	)
+"
+
+EPYTEST_PLUGINS=( pytest-mock )
+EPYTEST_RERUNS=5
+distutils_enable_tests pytest
+
+src_test() {
+	# tests rely on very specific text wrapping...
+	local -x COLUMNS=80
+	virtx distutils-r1_src_test
+}
+
+python_test() {
+	# TODO: tests_isolated?
+	nonfatal epytest -o addopts= tests || die
+}
+
+pkg_postinst() {
+	optfeature "IPython shell integration" dev-python/ipython
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.