Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/libtmux/, dev-python/libtmux/files/
Date: Tue, 03 Dec 2019 02:19:14
Message-Id: 1575339535.1e4bb775d7948e3ea507c97d16dffce744bce3a7.chutzpah@gentoo
1 commit: 1e4bb775d7948e3ea507c97d16dffce744bce3a7
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Tue Dec 3 01:52:08 2019 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 3 02:18:55 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e4bb775
7
8 dev-python/libtmux-0.8.2-r1: Revbump, enable tests, add py38 and pypy{,3}
9
10 Copyright: Sony Interactive Entertainment Inc.
11 Package-Manager: Portage-2.3.80, Repoman-2.3.19
12 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
13
14 dev-python/libtmux/Manifest | 1 +
15 dev-python/libtmux/files/libtmux-0.8.2-tests.patch | 47 ++++++++++++++++++++++
16 dev-python/libtmux/libtmux-0.8.2-r1.ebuild | 37 +++++++++++++++++
17 3 files changed, 85 insertions(+)
18
19 diff --git a/dev-python/libtmux/Manifest b/dev-python/libtmux/Manifest
20 index 532d74be787..e24e91e7cab 100644
21 --- a/dev-python/libtmux/Manifest
22 +++ b/dev-python/libtmux/Manifest
23 @@ -1 +1,2 @@
24 DIST libtmux-0.8.2.tar.gz 37725 BLAKE2B 909a34b1a77bb221e6fd0ca6ef9075cc9ddd4f327cecf579d8aaff768668c9a71cff07a6567cdc0aed368482188936626dfc3f35a0b6723cd962294e2fc9d5ec SHA512 02156579c91e44e312ebf162b5314381645177cba244294b3251044be35c84b996263508cdedfd25ea2c182a87a3ff457154b9ed06e919e7149583b119a5e227
25 +DIST libtmux-v0.8.2.tar.gz 117077 BLAKE2B 52e9c7c47911797e9d2446e7fbc836f9482912e255c05d9b329d4a33f5f03d0bfad4df492902eff5605180f90efcd81a7e432174646cb2051b0f9dfa6615a91a SHA512 e5f3768f4ddd746c5380a92899961be05b1b6c567d9333720b0fd9ed124131671bbecf1c04a7c4e658092424b6dc89dd656ba559385b0a6f673f9895dd6c829c
26
27 diff --git a/dev-python/libtmux/files/libtmux-0.8.2-tests.patch b/dev-python/libtmux/files/libtmux-0.8.2-tests.patch
28 new file mode 100644
29 index 00000000000..c402af58ea0
30 --- /dev/null
31 +++ b/dev-python/libtmux/files/libtmux-0.8.2-tests.patch
32 @@ -0,0 +1,47 @@
33 +diff --git a/tests/test_session.py b/tests/test_session.py
34 +index 79c9861..d83b095 100644
35 +--- a/tests/test_session.py
36 ++++ b/tests/test_session.py
37 +@@ -131,8 +131,8 @@ def test_empty_session_option_returns_None(session):
38 +
39 +
40 + def test_show_option_unknown(session):
41 +- """Session.show_option raises UnknownOption for invalid option."""
42 +- with pytest.raises(exc.UnknownOption):
43 ++ """Session.show_option raises InvalidOption for invalid option."""
44 ++ with pytest.raises(exc.InvalidOption):
45 + session.show_option('moooz')
46 +
47 +
48 +@@ -149,12 +149,12 @@ def test_set_option_ambigous(session):
49 +
50 +
51 + def test_set_option_invalid(session):
52 +- """Session.set_option raises UnknownOption for invalid option."""
53 ++ """Session.set_option raises InvalidOption for invalid option."""
54 + if has_gte_version('2.4'):
55 + with pytest.raises(exc.InvalidOption):
56 + session.set_option('afewewfew', 43)
57 + else:
58 +- with pytest.raises(exc.UnknownOption):
59 ++ with pytest.raises(exc.InvalidOption):
60 + session.set_option('afewewfew', 43)
61 +
62 +
63 +diff --git a/tests/test_window.py b/tests/test_window.py
64 +index 5d0a674..896fadf 100644
65 +--- a/tests/test_window.py
66 ++++ b/tests/test_window.py
67 +@@ -210,10 +210,10 @@ def test_show_window_option(session):
68 +
69 +
70 + def test_show_window_option_unknown(session):
71 +- """Window.show_window_option raises UnknownOption for bad option key."""
72 ++ """Window.show_window_option raises InvalidOption for bad option key."""
73 + window = session.new_window(window_name='test_window')
74 +
75 +- with pytest.raises(exc.UnknownOption):
76 ++ with pytest.raises(exc.InvalidOption):
77 + window.show_window_option('moooz')
78 +
79 +
80
81 diff --git a/dev-python/libtmux/libtmux-0.8.2-r1.ebuild b/dev-python/libtmux/libtmux-0.8.2-r1.ebuild
82 new file mode 100644
83 index 00000000000..8498cecd8d1
84 --- /dev/null
85 +++ b/dev-python/libtmux/libtmux-0.8.2-r1.ebuild
86 @@ -0,0 +1,37 @@
87 +# Copyright 1999-2019 Gentoo Authors
88 +# Distributed under the terms of the GNU General Public License v2
89 +
90 +EAPI=7
91 +PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy{,3} )
92 +
93 +inherit distutils-r1
94 +
95 +DESCRIPTION="python api for tmux"
96 +HOMEPAGE="https://libtmux.git-pull.com/"
97 +SRC_URI="https://github.com/tmux-python/${PN}/archive/v${PV}.tar.gz -> ${PN}-v${PV}.tar.gz"
98 +
99 +LICENSE="MIT"
100 +SLOT="0"
101 +KEYWORDS="~amd64 ~x86"
102 +
103 +BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
104 +RDEPEND="app-misc/tmux"
105 +
106 +PATCHES=(
107 + "${FILESDIR}/libtmux-0.8.2-tests.patch"
108 +)
109 +
110 +distutils_enable_tests pytest
111 +distutils_enable_sphinx doc \
112 + dev-python/alagitpull \
113 + dev-python/docutils
114 +
115 +python_prepare_all() {
116 + # avoid a dependency on sphinx_issues
117 + local issues="https://github.com/tmux-python/libtmux/issues/"
118 + sed -i "s:'sphinx_issues',::" doc/conf.py || die
119 + sed -r -i "s|:issue:\`([[:digit:]]+)\`|\`issue \1 ${issues}\1\`|" CHANGES || die
120 + rm requirements/doc.txt || die
121 +
122 + distutils-r1_python_prepare_all
123 +}