diff --git a/dev-python/cmd2/Manifest b/dev-python/cmd2/Manifest index b1dd91ba7b528..09959fc605d3b 100644 --- a/dev-python/cmd2/Manifest +++ b/dev-python/cmd2/Manifest @@ -1,2 +1,3 @@ DIST cmd2-2.6.2.tar.gz 592373 BLAKE2B 917ecd684c60c0a6c1b273ef52fa1e317f71522dfd6fc8a9d2c1ee7fa28788b734c6536a9481ac56ef8409002f503837ae51191478a68e364c4780e9feb4b8e8 SHA512 75531dca561427eef259765a55c6385401edd8bc9d5c4cf08ab97e53e118334be932ee5c59f9e1fcd529a7a5f7416e654ee1d618d91623068ef21bcc66dcfdd7 DIST cmd2-3.1.0.tar.gz 1002416 BLAKE2B d21981abc56e7493f725a7b6adfca8d46c694056069148764ec258a66e3a28a4ba2bf730ffd2376f4654c89d8a042cbcaef196bea0bf723190b2e3ed0dca8b1c SHA512 1135012fee82c1a43650a7ee3a3abe517a1803ad424be3bfdb9c902a5d581f9db04742a25b2a0a84e24855ff72beb31c691af39de6c69385be189a1381d61176 +DIST cmd2-3.1.2.tar.gz 708232 BLAKE2B 45f66f9c78b6f2dc244ed03f924b504c9c4435e8927b9d45a29888e9964918a4c646869a3ce12e4b483cfed97290ecc19036157041810d57f4ea91e37463cbe4 SHA512 383c627d92477f71bd4cb571873da3066ba91cd26865c45356519d744b004b5034a35ab59a2928c057b60fc4d7aa8a96d44185144dae1a684f2d12f8794566b1 diff --git a/dev-python/cmd2/cmd2-3.1.2.ebuild b/dev-python/cmd2/cmd2-3.1.2.ebuild new file mode 100644 index 0000000000000..00a74ca2640cb --- /dev/null +++ b/dev-python/cmd2/cmd2-3.1.2.ebuild @@ -0,0 +1,58 @@ +# 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_{11..14} ) + +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 ~mips ~ppc64 ~riscv ~s390 ~x86" + +RDEPEND=" + >=dev-python/pyperclip-1.8.2[${PYTHON_USEDEP}] + >=dev-python/rich-14.3.0[${PYTHON_USEDEP}] + >=dev-python/rich-argparse-1.7.1[${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 +}