summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVirgil Dupras <vdupras@gentoo.org>2018-07-31 20:47:31 -0400
committerVirgil Dupras <vdupras@gentoo.org>2018-08-01 08:09:58 -0400
commitac9e67fa461c484fd751040bb6b58c258b6d601c (patch)
tree4bd2a5db24f750907dcf0e71123ab1c13a5157ba
parentapp-portage/gemato: Add 14.0+multiprocessing version (diff)
downloadgentoo-ac9e67fa.tar.gz
gentoo-ac9e67fa.tar.bz2
gentoo-ac9e67fa.zip
dev-python/pytest-relaxed: disable plugin autoload
When installed, this plugins autoload everywhere pytest runs, breaking pretty much everything in its wake. We patch out its entry point to avoid autoloading. Packages using this plugin may load it manually by adding "-p pytest_relaxed.plugin" to their pytest invocation. Closes: https://bugs.gentoo.org/661218 Package-Manager: Portage-2.3.44, Repoman-2.3.10
-rw-r--r--dev-python/pytest-relaxed/Manifest1
-rw-r--r--dev-python/pytest-relaxed/files/pytest-relaxed-1.1.4-no-autoload.patch12
-rw-r--r--dev-python/pytest-relaxed/pytest-relaxed-1.1.4.ebuild35
3 files changed, 48 insertions, 0 deletions
diff --git a/dev-python/pytest-relaxed/Manifest b/dev-python/pytest-relaxed/Manifest
index 0faad2d9e9ac..b15fdf92d8c3 100644
--- a/dev-python/pytest-relaxed/Manifest
+++ b/dev-python/pytest-relaxed/Manifest
@@ -1 +1,2 @@
DIST pytest-relaxed-1.1.0.tar.gz 25942 BLAKE2B 6dd34044ec3ae0b5c85f0a76102aaeafe3dad8748c0cf34666dd3550162a2968191efb8415467259a4f072905af062aeabaaaeb475ab68d47aa8d79e3cadd3d0 SHA512 010e37c4d0c63bd00af8851bb50e52af7f8f17769be042e4941e8d8ba451920c24dfa6cdf74cd1b3ca4b3e1c71cd5e1ac34ffae855fc261cf431c212f98cbfff
+DIST pytest-relaxed-1.1.4.tar.gz 26854 BLAKE2B c9b4d7c5c68fb24deaa9b107960eec7b24ab1cfe4ed37f0ffa99b4e5a9d3572be860ff3bc39882f5024fb6aad73f5f976c450294cf713483bba655af56b70245 SHA512 d4e7ed5143ac9f1bff1f911e4ab3aede076d154dcecc28ce96cbc49782d186214893b942a3548da2789faa51df5ddbd43ff41c82b9bb9d0d52f38a2000fc0c6b
diff --git a/dev-python/pytest-relaxed/files/pytest-relaxed-1.1.4-no-autoload.patch b/dev-python/pytest-relaxed/files/pytest-relaxed-1.1.4-no-autoload.patch
new file mode 100644
index 000000000000..b176e4e86c3e
--- /dev/null
+++ b/dev-python/pytest-relaxed/files/pytest-relaxed-1.1.4-no-autoload.patch
@@ -0,0 +1,12 @@
+diff --git a/setup.py b/setup.py
+index 28c72c7..6feca5b 100644
+--- a/setup.py
++++ b/setup.py
+@@ -22,7 +22,6 @@ setup(
+ packages=find_packages(),
+ entry_points={
+ # TODO: do we need to name the LHS 'pytest_relaxed' too? meh
+- "pytest11": ["relaxed = pytest_relaxed.plugin"]
+ },
+ install_requires=[
+ # NOTE: pytest 3.3 broke something, not sure what yet
diff --git a/dev-python/pytest-relaxed/pytest-relaxed-1.1.4.ebuild b/dev-python/pytest-relaxed/pytest-relaxed-1.1.4.ebuild
new file mode 100644
index 000000000000..7ed7aeefa0e6
--- /dev/null
+++ b/dev-python/pytest-relaxed/pytest-relaxed-1.1.4.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
+
+inherit distutils-r1
+
+DESCRIPTION="py.test plugin for relaxed test discovery and organization"
+HOMEPAGE="https://pypi.org/project/pytest-relaxed/ https://github.com/bitprophet/pytest-relaxed"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="BSD-2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris"
+IUSE="test"
+
+RDEPEND="
+ >=dev-python/pytest-3[${PYTHON_USEDEP}]
+ >=dev-python/six-1[${PYTHON_USEDEP}]
+ >=dev-python/decorator-4[${PYTHON_USEDEP}]
+"
+
+PATCHES=(
+ # We strip pytest-relaxed's entry point to stop it from autoloading on all
+ # tests. When this package is installed, it has the habit of being
+ # autoloaded everywhere and break every test. If you want to load it, add
+ # "-p pytest_relaxed.plugin" to your pytest invocation.
+ "${FILESDIR}/${PN}-1.1.4-no-autoload.patch"
+)
+
+python_test() {
+ pytest -v || die "tests failed with ${EPYTHON}"
+}