Gentoo Archives: gentoo-commits

From: Virgil Dupras <vdupras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/invoke/files/, dev-python/invoke/
Date: Mon, 30 Jul 2018 20:21:29
Message-Id: 1532982027.d10462334dd6722000f6f0c181430ac7d846a711.vdupras@gentoo
1 commit: d10462334dd6722000f6f0c181430ac7d846a711
2 Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 30 20:20:27 2018 +0000
4 Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 30 20:20:27 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1046233
7
8 dev-python/invoke: bump to 1.1.0
9
10 * EAPI 7
11 * Python 3.7
12 * Enable tests
13
14 Package-Manager: Portage-2.3.44, Repoman-2.3.10
15
16 dev-python/invoke/Manifest | 2 +-
17 .../invoke/files/invoke-1.1.0-skip-pty-tests.patch | 29 +++++++++++++++++++
18 dev-python/invoke/invoke-0.22.1.ebuild | 15 ----------
19 dev-python/invoke/invoke-1.1.0.ebuild | 33 ++++++++++++++++++++++
20 4 files changed, 63 insertions(+), 16 deletions(-)
21
22 diff --git a/dev-python/invoke/Manifest b/dev-python/invoke/Manifest
23 index 401ff3b9981..3d33426132a 100644
24 --- a/dev-python/invoke/Manifest
25 +++ b/dev-python/invoke/Manifest
26 @@ -1 +1 @@
27 -DIST invoke-0.22.1.tar.gz 292418 BLAKE2B ae392d3cd84ff58a0e2f24a8beed7b0d556a45d55a11fb5522bfe11351d2b47512e7910a18bad2db1e1475410d9c15b0af4cedbae06240133d5d8b320c362669 SHA512 e1c55435923bbfae8eb8f22a7dff81ce3e127cecbc0c33c002acb94d49c6cd41b7fbaf54beea654c77873bbbc8bcc85c7a61cf5789af80758d5b3abd7d2a61b0
28 +DIST invoke-1.1.0.tar.gz 309811 BLAKE2B d1832d141a50d5ee9039614191cc02f266f440fd939463d572218a79ded9384ac8dc71798f716482021a0cc39611bc51b73973b67973d3cd5a3d208608091e17 SHA512 6b8ebee7d2dd68fe0134491b15a3b85fd6d1493c5b81f00ba577c6bcf3e4a264d74f68bdd0d40a4c5bdde18c021395ee335d10dde8e676bc9efb313e1ae9b55c
29
30 diff --git a/dev-python/invoke/files/invoke-1.1.0-skip-pty-tests.patch b/dev-python/invoke/files/invoke-1.1.0-skip-pty-tests.patch
31 new file mode 100644
32 index 00000000000..d09eac74f91
33 --- /dev/null
34 +++ b/dev-python/invoke/files/invoke-1.1.0-skip-pty-tests.patch
35 @@ -0,0 +1,29 @@
36 +This patch skips all tests related to PTYs: they all fail under portage
37 +because we don't have a valid TTY. Skip them. A bing chunk of them are
38 +skipped through "skipper()" under mock_pty. The rest of them are skipped
39 +by simulation windows (tests that don't run under windows don't run under
40 +portage either).
41 +diff --git a/tests/_util.py b/tests/_util.py
42 +index d954946b..27381cfd 100644
43 +--- a/tests/_util.py
44 ++++ b/tests/_util.py
45 +@@ -24,7 +24,7 @@ support = os.path.join(os.path.dirname(__file__), "_support")
46 + def skip_if_windows(fn):
47 + @wraps(fn)
48 + def wrapper(*args, **kwargs):
49 +- if WINDOWS:
50 ++ if True:
51 + skip()
52 + return fn(*args, **kwargs)
53 +
54 +@@ -190,6 +190,10 @@ def mock_pty(
55 + return skip_if_windows
56 +
57 + def decorator(f):
58 ++ def skipper(*args, **kwargs):
59 ++ skip()
60 ++
61 ++ return skipper
62 + import fcntl
63 +
64 + ioctl_patch = patch("invoke.runners.fcntl.ioctl", wraps=fcntl.ioctl)
65
66 diff --git a/dev-python/invoke/invoke-0.22.1.ebuild b/dev-python/invoke/invoke-0.22.1.ebuild
67 deleted file mode 100644
68 index 1db8ec13df9..00000000000
69 --- a/dev-python/invoke/invoke-0.22.1.ebuild
70 +++ /dev/null
71 @@ -1,15 +0,0 @@
72 -# Copyright 1999-2018 Gentoo Foundation
73 -# Distributed under the terms of the GNU General Public License v2
74 -
75 -EAPI=6
76 -PYTHON_COMPAT=( python{2_7,3_5,3_6} )
77 -inherit distutils-r1
78 -
79 -DESCRIPTION="Pythonic task execution"
80 -HOMEPAGE="https://pypi.org/project/invoke/"
81 -SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
82 -DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
83 -RDEPEND=""
84 -LICENSE="BSD-2"
85 -SLOT="0"
86 -KEYWORDS="~amd64 ~x86"
87
88 diff --git a/dev-python/invoke/invoke-1.1.0.ebuild b/dev-python/invoke/invoke-1.1.0.ebuild
89 new file mode 100644
90 index 00000000000..80bbd00caf2
91 --- /dev/null
92 +++ b/dev-python/invoke/invoke-1.1.0.ebuild
93 @@ -0,0 +1,33 @@
94 +# Copyright 1999-2018 Gentoo Foundation
95 +# Distributed under the terms of the GNU General Public License v2
96 +
97 +EAPI=7
98 +PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
99 +inherit distutils-r1
100 +
101 +DESCRIPTION="Pythonic task execution"
102 +HOMEPAGE="https://pypi.org/project/invoke/"
103 +SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
104 +
105 +LICENSE="BSD-2"
106 +SLOT="0"
107 +KEYWORDS="~amd64 ~x86"
108 +IUSE="test"
109 +
110 +BDEPEND="
111 + dev-python/setuptools[${PYTHON_USEDEP}]
112 + test? (
113 + dev-python/mock
114 + >=dev-python/pytest-3.0
115 + dev-python/pytest-relaxed
116 + )"
117 +RDEPEND=""
118 +
119 +PATCHES=(
120 + "${FILESDIR}/${PN}-1.1.0-skip-pty-tests.patch"
121 +)
122 +
123 +python_test() {
124 + # -s flag is important: tests fail when pytest isn't in "no capture" mode
125 + ${EPYTHON} -m pytest -s -v
126 +}