commit:     1e4bb775d7948e3ea507c97d16dffce744bce3a7
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Tue Dec  3 01:52:08 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Tue Dec  3 02:18:55 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e4bb775

dev-python/libtmux-0.8.2-r1: Revbump, enable tests, add py38 and pypy{,3}

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.80, Repoman-2.3.19
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-python/libtmux/Manifest                        |  1 +
 dev-python/libtmux/files/libtmux-0.8.2-tests.patch | 47 ++++++++++++++++++++++
 dev-python/libtmux/libtmux-0.8.2-r1.ebuild         | 37 +++++++++++++++++
 3 files changed, 85 insertions(+)

diff --git a/dev-python/libtmux/Manifest b/dev-python/libtmux/Manifest
index 532d74be787..e24e91e7cab 100644
--- a/dev-python/libtmux/Manifest
+++ b/dev-python/libtmux/Manifest
@@ -1 +1,2 @@
 DIST libtmux-0.8.2.tar.gz 37725 BLAKE2B 
909a34b1a77bb221e6fd0ca6ef9075cc9ddd4f327cecf579d8aaff768668c9a71cff07a6567cdc0aed368482188936626dfc3f35a0b6723cd962294e2fc9d5ec
 SHA512 
02156579c91e44e312ebf162b5314381645177cba244294b3251044be35c84b996263508cdedfd25ea2c182a87a3ff457154b9ed06e919e7149583b119a5e227
+DIST libtmux-v0.8.2.tar.gz 117077 BLAKE2B 
52e9c7c47911797e9d2446e7fbc836f9482912e255c05d9b329d4a33f5f03d0bfad4df492902eff5605180f90efcd81a7e432174646cb2051b0f9dfa6615a91a
 SHA512 
e5f3768f4ddd746c5380a92899961be05b1b6c567d9333720b0fd9ed124131671bbecf1c04a7c4e658092424b6dc89dd656ba559385b0a6f673f9895dd6c829c

diff --git a/dev-python/libtmux/files/libtmux-0.8.2-tests.patch 
b/dev-python/libtmux/files/libtmux-0.8.2-tests.patch
new file mode 100644
index 00000000000..c402af58ea0
--- /dev/null
+++ b/dev-python/libtmux/files/libtmux-0.8.2-tests.patch
@@ -0,0 +1,47 @@
+diff --git a/tests/test_session.py b/tests/test_session.py
+index 79c9861..d83b095 100644
+--- a/tests/test_session.py
++++ b/tests/test_session.py
+@@ -131,8 +131,8 @@ def test_empty_session_option_returns_None(session):
+ 
+ 
+ def test_show_option_unknown(session):
+-    """Session.show_option raises UnknownOption for invalid option."""
+-    with pytest.raises(exc.UnknownOption):
++    """Session.show_option raises InvalidOption for invalid option."""
++    with pytest.raises(exc.InvalidOption):
+         session.show_option('moooz')
+ 
+ 
+@@ -149,12 +149,12 @@ def test_set_option_ambigous(session):
+ 
+ 
+ def test_set_option_invalid(session):
+-    """Session.set_option raises UnknownOption for invalid option."""
++    """Session.set_option raises InvalidOption for invalid option."""
+     if has_gte_version('2.4'):
+         with pytest.raises(exc.InvalidOption):
+             session.set_option('afewewfew', 43)
+     else:
+-        with pytest.raises(exc.UnknownOption):
++        with pytest.raises(exc.InvalidOption):
+             session.set_option('afewewfew', 43)
+ 
+ 
+diff --git a/tests/test_window.py b/tests/test_window.py
+index 5d0a674..896fadf 100644
+--- a/tests/test_window.py
++++ b/tests/test_window.py
+@@ -210,10 +210,10 @@ def test_show_window_option(session):
+ 
+ 
+ def test_show_window_option_unknown(session):
+-    """Window.show_window_option raises UnknownOption for bad option key."""
++    """Window.show_window_option raises InvalidOption for bad option key."""
+     window = session.new_window(window_name='test_window')
+ 
+-    with pytest.raises(exc.UnknownOption):
++    with pytest.raises(exc.InvalidOption):
+         window.show_window_option('moooz')
+ 
+ 

diff --git a/dev-python/libtmux/libtmux-0.8.2-r1.ebuild 
b/dev-python/libtmux/libtmux-0.8.2-r1.ebuild
new file mode 100644
index 00000000000..8498cecd8d1
--- /dev/null
+++ b/dev-python/libtmux/libtmux-0.8.2-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy{,3} )
+
+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 -> 
${PN}-v${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="app-misc/tmux"
+
+PATCHES=(
+       "${FILESDIR}/libtmux-0.8.2-tests.patch"
+)
+
+distutils_enable_tests pytest
+distutils_enable_sphinx doc \
+       dev-python/alagitpull \
+       dev-python/docutils
+
+python_prepare_all() {
+       # avoid a dependency on sphinx_issues
+       local issues="https://github.com/tmux-python/libtmux/issues/";
+       sed -i "s:'sphinx_issues',::" doc/conf.py || die
+       sed -r -i "s|:issue:\`([[:digit:]]+)\`|\`issue \1 ${issues}\1\`|" 
CHANGES || die
+       rm requirements/doc.txt || die
+
+       distutils-r1_python_prepare_all
+}

Reply via email to