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/pytest-relaxed/, dev-python/pytest-relaxed/files/
Date: Wed, 01 Aug 2018 12:11:06
Message-Id: 1533125398.ac9e67fa461c484fd751040bb6b58c258b6d601c.vdupras@gentoo
1 commit: ac9e67fa461c484fd751040bb6b58c258b6d601c
2 Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 1 00:47:31 2018 +0000
4 Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 1 12:09:58 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac9e67fa
7
8 dev-python/pytest-relaxed: disable plugin autoload
9
10 When installed, this plugins autoload everywhere pytest runs, breaking
11 pretty much everything in its wake. We patch out its entry point to
12 avoid autoloading. Packages using this plugin may load it manually by
13 adding "-p pytest_relaxed.plugin" to their pytest invocation.
14
15 Closes: https://bugs.gentoo.org/661218
16 Package-Manager: Portage-2.3.44, Repoman-2.3.10
17
18 dev-python/pytest-relaxed/Manifest | 1 +
19 .../files/pytest-relaxed-1.1.4-no-autoload.patch | 12 ++++++++
20 .../pytest-relaxed/pytest-relaxed-1.1.4.ebuild | 35 ++++++++++++++++++++++
21 3 files changed, 48 insertions(+)
22
23 diff --git a/dev-python/pytest-relaxed/Manifest b/dev-python/pytest-relaxed/Manifest
24 index 0faad2d9e9a..b15fdf92d8c 100644
25 --- a/dev-python/pytest-relaxed/Manifest
26 +++ b/dev-python/pytest-relaxed/Manifest
27 @@ -1 +1,2 @@
28 DIST pytest-relaxed-1.1.0.tar.gz 25942 BLAKE2B 6dd34044ec3ae0b5c85f0a76102aaeafe3dad8748c0cf34666dd3550162a2968191efb8415467259a4f072905af062aeabaaaeb475ab68d47aa8d79e3cadd3d0 SHA512 010e37c4d0c63bd00af8851bb50e52af7f8f17769be042e4941e8d8ba451920c24dfa6cdf74cd1b3ca4b3e1c71cd5e1ac34ffae855fc261cf431c212f98cbfff
29 +DIST pytest-relaxed-1.1.4.tar.gz 26854 BLAKE2B c9b4d7c5c68fb24deaa9b107960eec7b24ab1cfe4ed37f0ffa99b4e5a9d3572be860ff3bc39882f5024fb6aad73f5f976c450294cf713483bba655af56b70245 SHA512 d4e7ed5143ac9f1bff1f911e4ab3aede076d154dcecc28ce96cbc49782d186214893b942a3548da2789faa51df5ddbd43ff41c82b9bb9d0d52f38a2000fc0c6b
30
31 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
32 new file mode 100644
33 index 00000000000..b176e4e86c3
34 --- /dev/null
35 +++ b/dev-python/pytest-relaxed/files/pytest-relaxed-1.1.4-no-autoload.patch
36 @@ -0,0 +1,12 @@
37 +diff --git a/setup.py b/setup.py
38 +index 28c72c7..6feca5b 100644
39 +--- a/setup.py
40 ++++ b/setup.py
41 +@@ -22,7 +22,6 @@ setup(
42 + packages=find_packages(),
43 + entry_points={
44 + # TODO: do we need to name the LHS 'pytest_relaxed' too? meh
45 +- "pytest11": ["relaxed = pytest_relaxed.plugin"]
46 + },
47 + install_requires=[
48 + # NOTE: pytest 3.3 broke something, not sure what yet
49
50 diff --git a/dev-python/pytest-relaxed/pytest-relaxed-1.1.4.ebuild b/dev-python/pytest-relaxed/pytest-relaxed-1.1.4.ebuild
51 new file mode 100644
52 index 00000000000..7ed7aeefa0e
53 --- /dev/null
54 +++ b/dev-python/pytest-relaxed/pytest-relaxed-1.1.4.ebuild
55 @@ -0,0 +1,35 @@
56 +# Copyright 1999-2018 Gentoo Foundation
57 +# Distributed under the terms of the GNU General Public License v2
58 +
59 +EAPI=7
60 +
61 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
62 +
63 +inherit distutils-r1
64 +
65 +DESCRIPTION="py.test plugin for relaxed test discovery and organization"
66 +HOMEPAGE="https://pypi.org/project/pytest-relaxed/ https://github.com/bitprophet/pytest-relaxed"
67 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
68 +
69 +SLOT="0"
70 +LICENSE="BSD-2"
71 +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"
72 +IUSE="test"
73 +
74 +RDEPEND="
75 + >=dev-python/pytest-3[${PYTHON_USEDEP}]
76 + >=dev-python/six-1[${PYTHON_USEDEP}]
77 + >=dev-python/decorator-4[${PYTHON_USEDEP}]
78 +"
79 +
80 +PATCHES=(
81 + # We strip pytest-relaxed's entry point to stop it from autoloading on all
82 + # tests. When this package is installed, it has the habit of being
83 + # autoloaded everywhere and break every test. If you want to load it, add
84 + # "-p pytest_relaxed.plugin" to your pytest invocation.
85 + "${FILESDIR}/${PN}-1.1.4-no-autoload.patch"
86 +)
87 +
88 +python_test() {
89 + pytest -v || die "tests failed with ${EPYTHON}"
90 +}