summaryrefslogtreecommitdiff
path: root/dev-python/invoke
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-08-04 08:53:53 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-08-04 08:53:53 +0100
commite3872864be25f7421015bef2732fa57c0c9fb726 (patch)
tree9cb29a544215119b5c5538e37211b994ce1c87ae /dev-python/invoke
parent480486b52ea64765faf696c88b2c6a26a5a454d4 (diff)
gentoo resync : 04.08.2018
Diffstat (limited to 'dev-python/invoke')
-rw-r--r--dev-python/invoke/Manifest5
-rw-r--r--dev-python/invoke/files/invoke-1.1.0-skip-pty-tests.patch29
-rw-r--r--dev-python/invoke/invoke-0.22.1.ebuild15
-rw-r--r--dev-python/invoke/invoke-1.1.1.ebuild34
4 files changed, 66 insertions, 17 deletions
diff --git a/dev-python/invoke/Manifest b/dev-python/invoke/Manifest
index cd79344aaff5..c21f4b87e207 100644
--- a/dev-python/invoke/Manifest
+++ b/dev-python/invoke/Manifest
@@ -1,3 +1,4 @@
-DIST invoke-0.22.1.tar.gz 292418 BLAKE2B ae392d3cd84ff58a0e2f24a8beed7b0d556a45d55a11fb5522bfe11351d2b47512e7910a18bad2db1e1475410d9c15b0af4cedbae06240133d5d8b320c362669 SHA512 e1c55435923bbfae8eb8f22a7dff81ce3e127cecbc0c33c002acb94d49c6cd41b7fbaf54beea654c77873bbbc8bcc85c7a61cf5789af80758d5b3abd7d2a61b0
-EBUILD invoke-0.22.1.ebuild 416 BLAKE2B 10c5c931974e3823655e3cc9249b9a451e77e292ba7e5acd705e3f3dfa1ce55d96b5edb397f17c303729043e72220034661f5c28231c9d9af80d54468ec4c741 SHA512 70a075bcc11263fb444cf868f0f1ae29f68f265944245fa7da80aeafee4bdc7c435a620cd30739e962a315ae9613a23f781328af79b75dd0168f501618d9c978
+AUX invoke-1.1.0-skip-pty-tests.patch 959 BLAKE2B 4e23e88f3cdee0a3e7408b3fa217dafe28f36967516a7231543e8303b22c901a5c63a45dcf1332ae7a6e5d031fd535f8674388474429deec15535ad378cd02a7 SHA512 3ee402afa6f658639b56049e114b9e243be91e0a8016f0fda18d3f34c3a3e8d1be9a452d4828f072fc220b185790c820c43bb5d9a7b9060265c181fe2f63c58e
+DIST invoke-1.1.1.tar.gz 311831 BLAKE2B 2918c1a03cccbd90be6aa495206a2714f45c9690d8ce1b063adc0cacfa4c7accd36dd94863a83e9cc0c05aaf889bd746c3f528fad5af0db9f64725438866f81a SHA512 2dabf88428a53f244cab45cbc073b3a91fea5dd97a7590a58701a32bfaa14a4afe5d6a2e4ff4ed03ae38e1dfecc5a7c0f811bb18313e0af1f4e116f56c5e9ba7
+EBUILD invoke-1.1.1.ebuild 807 BLAKE2B 62bc62c294380059f7e475f05ebd03f74415bbc39c1e13a4faa79a3793979afafaa53d8989ccbf3738db9ff90e13c40fd419c1966b764cc2c1f653875c1548cf SHA512 73787e63db0d2de16716fa34dffc505ed9dc85cf659c39226eaba0d9109a8c783deb6ae817de213dd708211f6d6367e90775604f3d57a4a4755fc7088a5a5b66
MISC metadata.xml 438 BLAKE2B fd7de2d82839646be57042d5db8b2d4a27f9e3f16bad202dc068d2eaf590e04952003d67614c98554c631668c0c31927a7e3a4f73ec15761a66631d01cf6aef3 SHA512 eb37fe7d88bec1255f2579bd9e60054b887c466984017501327a48a6a8ae6e3a3b3b473c850db94b0dda7bdeeb63b8c60e0cdae041fa034854fb68ee416fc9bd
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
new file mode 100644
index 000000000000..d09eac74f91d
--- /dev/null
+++ b/dev-python/invoke/files/invoke-1.1.0-skip-pty-tests.patch
@@ -0,0 +1,29 @@
+This patch skips all tests related to PTYs: they all fail under portage
+because we don't have a valid TTY. Skip them. A bing chunk of them are
+skipped through "skipper()" under mock_pty. The rest of them are skipped
+by simulation windows (tests that don't run under windows don't run under
+portage either).
+diff --git a/tests/_util.py b/tests/_util.py
+index d954946b..27381cfd 100644
+--- a/tests/_util.py
++++ b/tests/_util.py
+@@ -24,7 +24,7 @@ support = os.path.join(os.path.dirname(__file__), "_support")
+ def skip_if_windows(fn):
+ @wraps(fn)
+ def wrapper(*args, **kwargs):
+- if WINDOWS:
++ if True:
+ skip()
+ return fn(*args, **kwargs)
+
+@@ -190,6 +190,10 @@ def mock_pty(
+ return skip_if_windows
+
+ def decorator(f):
++ def skipper(*args, **kwargs):
++ skip()
++
++ return skipper
+ import fcntl
+
+ ioctl_patch = patch("invoke.runners.fcntl.ioctl", wraps=fcntl.ioctl)
diff --git a/dev-python/invoke/invoke-0.22.1.ebuild b/dev-python/invoke/invoke-0.22.1.ebuild
deleted file mode 100644
index 1db8ec13df92..000000000000
--- a/dev-python/invoke/invoke-0.22.1.ebuild
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python{2_7,3_5,3_6} )
-inherit distutils-r1
-
-DESCRIPTION="Pythonic task execution"
-HOMEPAGE="https://pypi.org/project/invoke/"
-SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-RDEPEND=""
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
diff --git a/dev-python/invoke/invoke-1.1.1.ebuild b/dev-python/invoke/invoke-1.1.1.ebuild
new file mode 100644
index 000000000000..ec7d500d93db
--- /dev/null
+++ b/dev-python/invoke/invoke-1.1.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
+inherit distutils-r1
+
+DESCRIPTION="Pythonic task execution"
+HOMEPAGE="https://pypi.org/project/invoke/"
+SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+BDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/mock
+ >=dev-python/pytest-3.0
+ >=dev-python/pytest-relaxed-1.1.4
+ )"
+RDEPEND=""
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.0-skip-pty-tests.patch"
+)
+
+python_test() {
+ # -s flag is important: tests fail when pytest isn't in "no capture" mode
+ # -p pytest_relaxed: this plugin has to be loaded explicitly
+ pytest -s -v -p pytest_relaxed.plugin || die "Tests failed"
+}