summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2022-09-22 22:05:26 -0700
committerPatrick McLean <chutzpah@gentoo.org>2022-09-22 22:05:53 -0700
commitfbc951dc7233310828ca43457f1a581ce9164efc (patch)
tree421cef5f88ade552990e9700f65679cb0017e49d
parentdev-lang/rust: drop -gentoo-linux-musl target support (diff)
downloadgentoo-fbc951dc7233310828ca43457f1a581ce9164efc.tar.gz
gentoo-fbc951dc7233310828ca43457f1a581ce9164efc.tar.bz2
gentoo-fbc951dc7233310828ca43457f1a581ce9164efc.zip
dev-python/libtmux: add 0.15.4
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
-rw-r--r--dev-python/libtmux/Manifest1
-rw-r--r--dev-python/libtmux/files/libtmux-0.15.4-no-doctest.patch13
-rw-r--r--dev-python/libtmux/libtmux-0.15.4.ebuild52
3 files changed, 66 insertions, 0 deletions
diff --git a/dev-python/libtmux/Manifest b/dev-python/libtmux/Manifest
index 74da2767fb07..97fa5b5b0937 100644
--- a/dev-python/libtmux/Manifest
+++ b/dev-python/libtmux/Manifest
@@ -1 +1,2 @@
DIST libtmux-0.14.2.gh.tar.gz 234682 BLAKE2B e93b0a280c3cfdfab4c9a313d251d15665c530813f00aa78151efe62a6a566f2d8986afed015de4a8be80b48f31ac197e98d3efa592eb8895e8d9626ff34ef72 SHA512 1565529ecf555dac8f896146e2d802c0e5460458ea1da6ba5496d5d2c394f56cc8c5f7650c5d4aebd1750659bbdc529e439e60dff6a0ccef8806bb65305d2421
+DIST libtmux-0.15.4.gh.tar.gz 237928 BLAKE2B b12643336717fbba079df884aa7b8a3029c393afd0dbcfe7be07d7c08f15a8252ec73479f5423fbe86efe63fb990529f68ed5690b40e2c7938df7edd2c6e51e5 SHA512 41adc83fde64a00385bb6885243b50c73e4cedd4d0860b1eb5c9a533b73d2f7fedef1e23f1b994c809abb834b666931c3fbdccd417969865172777e34a1cc5fe
diff --git a/dev-python/libtmux/files/libtmux-0.15.4-no-doctest.patch b/dev-python/libtmux/files/libtmux-0.15.4-no-doctest.patch
new file mode 100644
index 000000000000..ecfebaa450ca
--- /dev/null
+++ b/dev-python/libtmux/files/libtmux-0.15.4-no-doctest.patch
@@ -0,0 +1,13 @@
+diff --git a/setup.cfg b/setup.cfg
+index 2547e73..3659616 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -19,7 +19,7 @@ line_length = 88
+ [tool:pytest]
+ filterwarnings =
+ ignore:.* Use packaging.version.*:DeprecationWarning::
+-addopts = --tb=short --no-header --showlocals --doctest-docutils-modules --reruns 2 -p no:doctest
++addopts = --tb=short --no-header --showlocals --reruns 2 -p no:doctest
+ doctest_optionflags = ELLIPSIS NORMALIZE_WHITESPACE
+ testpaths =
+ src/libtmux
diff --git a/dev-python/libtmux/libtmux-0.15.4.ebuild b/dev-python/libtmux/libtmux-0.15.4.ebuild
new file mode 100644
index 000000000000..c26d228b0f9e
--- /dev/null
+++ b/dev-python/libtmux/libtmux-0.15.4.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="python api for tmux"
+HOMEPAGE="https://libtmux.git-pull.com/"
+SRC_URI="
+ https://github.com/tmux-python/${PN}/archive/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86"
+
+RDEPEND="
+ >=app-misc/tmux-3.0a
+"
+BDEPEND="
+ test? (
+ dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ dev-python/twine[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/libtmux-0.15.4-no-doctest.patch"
+)
+
+distutils_enable_tests pytest
+
+EPYTEST_DESELECT=(
+ libtmux/pane.py::libtmux.pane.Pane.send_keys
+)
+
+python_prepare_all() {
+ local issues="https://github.com/tmux-python/libtmux/issues/"
+ sed -r -i "s|:issue:\`([[:digit:]]+)\`|\`issue \1 ${issues}\1\`|" CHANGES || die
+ rm requirements/doc.txt || die
+
+ # increase timeouts for tests
+ sed -e 's/0.01/0.1/' -i tests/test_test.py || die
+
+ distutils-r1_python_prepare_all
+}