public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-relaxed/, dev-python/pytest-relaxed/files/
@ 2018-08-01 12:11 Virgil Dupras
  0 siblings, 0 replies; only message in thread
From: Virgil Dupras @ 2018-08-01 12:11 UTC (permalink / raw
  To: gentoo-commits

commit:     ac9e67fa461c484fd751040bb6b58c258b6d601c
Author:     Virgil Dupras <vdupras <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  1 00:47:31 2018 +0000
Commit:     Virgil Dupras <vdupras <AT> gentoo <DOT> org>
CommitDate: Wed Aug  1 12:09:58 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac9e67fa

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

 dev-python/pytest-relaxed/Manifest                 |  1 +
 .../files/pytest-relaxed-1.1.4-no-autoload.patch   | 12 ++++++++
 .../pytest-relaxed/pytest-relaxed-1.1.4.ebuild     | 35 ++++++++++++++++++++++
 3 files changed, 48 insertions(+)

diff --git a/dev-python/pytest-relaxed/Manifest b/dev-python/pytest-relaxed/Manifest
index 0faad2d9e9a..b15fdf92d8c 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 00000000000..b176e4e86c3
--- /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 00000000000..7ed7aeefa0e
--- /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}"
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-08-01 12:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-01 12:11 [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-relaxed/, dev-python/pytest-relaxed/files/ Virgil Dupras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox