summaryrefslogtreecommitdiff
path: root/dev-python/pytest-timeout
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-python/pytest-timeout
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-python/pytest-timeout')
-rw-r--r--dev-python/pytest-timeout/Manifest14
-rw-r--r--dev-python/pytest-timeout/files/pytest-timeout-1.3.3-tests.patch25
-rw-r--r--dev-python/pytest-timeout/files/pytest-timeout-1.4.2-optional-cov.patch27
-rw-r--r--dev-python/pytest-timeout/metadata.xml1
-rw-r--r--dev-python/pytest-timeout/pytest-timeout-1.3.3.ebuild30
-rw-r--r--dev-python/pytest-timeout/pytest-timeout-1.3.4.ebuild2
-rw-r--r--dev-python/pytest-timeout/pytest-timeout-1.4.0.ebuild32
-rw-r--r--dev-python/pytest-timeout/pytest-timeout-1.4.2.ebuild (renamed from dev-python/pytest-timeout/pytest-timeout-1.4.1.ebuild)15
8 files changed, 44 insertions, 102 deletions
diff --git a/dev-python/pytest-timeout/Manifest b/dev-python/pytest-timeout/Manifest
index 6a6143854b1e..67ca92b3ca26 100644
--- a/dev-python/pytest-timeout/Manifest
+++ b/dev-python/pytest-timeout/Manifest
@@ -1,10 +1,6 @@
-AUX pytest-timeout-1.3.3-tests.patch 1113 BLAKE2B 88e8158169bb254b4c36c6eb3a32a4f9c78b3e47ef080e2d28703ef0826267b3c925bd6de84b72f1e5b30b4109fcc99fd830704f2790e5505d5974eca90af676 SHA512 3543b0240d17a7e6e3aed29553e22a9638b285817110dd1fddbc26f667ab3c00864572ea4f9e4564c81e7dca60203b24e7ea2b317b6e328a48d518853e7ea26a
-DIST pytest-timeout-1.3.3.tar.gz 11627 BLAKE2B e20348cc461ad03e95c22a16e753b72441ee70da9769214f4d07db15818a8997339ced47244b15de62a61107eb749dff8d6f41ddb4720c925ef1e6eb9962db27 SHA512 633f5aee550d568e403b958f4490ecb828eb322811c9f18cfefb26613be4fc36da14232ecbef8666fcf2dc693a93674c00a853ab546ea8328a07ea34da79fb84
+AUX pytest-timeout-1.4.2-optional-cov.patch 839 BLAKE2B adc39941d090788666a5fa74d602fc7c2d7252622d5d213f8308728df7f198faf82edd9d56b3bb3cc277e62608cc6f59909ddce881e1a5931dde1f21f3671d32 SHA512 adb234da8272cf1b61d80db6d9c2b99cb0297044a962f3f54c7d9991ec8a142e6df3eb95fb29ee56326b3bd89e8af6d754f3c92f21a9fce934cd5d0af7fe4d05
DIST pytest-timeout-1.3.4.tar.gz 12255 BLAKE2B c8991e0255a490048f43e1163d0315cb8fabfaf9d96deb476e2d59da7efce8c63da09b1e8e6f9d6f3fe82b3c6f67608b5e5db117e6378a041ca6e5ba9c71fc05 SHA512 29af25f3c3776d9ef63c6b7217ffc6b0cedd873b8cc96be742a642da84d12c8988bb9b409e00850246e554b21908d6fd2207692650b154cf6831f38c4395bc80
-DIST pytest-timeout-1.4.0.tar.gz 13661 BLAKE2B d55cf85e44da1e8216d28d08c6783e720a37dbc4bed58c82a24918ac471e8d66f33967f16a249aa5307d0e227082e5628c06041b1bbd12e251a97449c69e5cb5 SHA512 457e30c0746e2762f4a62b0cdbad4f7ca4514175d97daa97fdbb1ebab8743085e828336f137a9cc7dc655c0827c038177195b589ed531d81bb911b6e5e5c875d
-DIST pytest-timeout-1.4.1.tar.gz 13804 BLAKE2B 45e9bdf6eb39e706cac2c9484cd34a9f16096d71d0146251bef9591c35c269043c95e641bed40b25e3d2076fe29a5782363bf9130b331eb04c4e867b1e8f646b SHA512 b62b090365c1cfe1a4d544b5645f828e451ec5229313c50a26ce04ba6cb203ff9ab487c61fb000af342f3d499e11f67aff5f84ff5b00328a129f1f39d4aabf28
-EBUILD pytest-timeout-1.3.3.ebuild 741 BLAKE2B e3408a045aa7dfcb9e3e752c413a257cb57c9f3e7f4d2b12ac120ce0fee057e0f481ed09b83bac86a005587a96e4140305af98b95048ac3292bb3c42c238d4fb SHA512 7d589a28ee3ed5b286ad0fd4d0e1eac46f1236631f69c868576f182f6281475243981c31a828d1190605bdee5a5c25143e31f42f8c4daee810ed1594b187c275
-EBUILD pytest-timeout-1.3.4.ebuild 760 BLAKE2B 1d66d2e4880ba14a840f920e0b36d4d2ebdbfe4a06b70eb4d57746c522674499704c1b201d0a8e8e49a1cc1090c19d155ccd1ffc887793e06926f23e07b28df9 SHA512 5b273c35f9bb2a9999c0b6a951d4ce31cc21a3a6218a89c4d6e7bfca0cbfa3603ac42e9910ddd3819f136ebb73b5492fb398dfee4be554335e3a23982085ee4d
-EBUILD pytest-timeout-1.4.0.ebuild 760 BLAKE2B 1d66d2e4880ba14a840f920e0b36d4d2ebdbfe4a06b70eb4d57746c522674499704c1b201d0a8e8e49a1cc1090c19d155ccd1ffc887793e06926f23e07b28df9 SHA512 5b273c35f9bb2a9999c0b6a951d4ce31cc21a3a6218a89c4d6e7bfca0cbfa3603ac42e9910ddd3819f136ebb73b5492fb398dfee4be554335e3a23982085ee4d
-EBUILD pytest-timeout-1.4.1.ebuild 842 BLAKE2B 89f6b0a532534d54dab1fd9b6e51fafc7ddc4774f44d2c10d2f830a1dd9b68f37b77c8663f955be6e719491f1cc7aa79eb9c782a89cf91a22a337381e838577c SHA512 213ddf28bdf2b7fbe831ea17c1f2e0b1f397f35acc7c95085d2e58058318d92cb6c03cba18bd67cc77ef4bef96f5568d1104b4fca7f705ac5adc14b012fff0f9
-MISC metadata.xml 327 BLAKE2B 23dc2e5e6f023223ab4774206b2d94fd27fc0a6b2592c8e0c317e1c1a0e7c26ed4f8e23187c5499b7fc9c4acc0df601a056ab1dced8115a47a9e72697037fa32 SHA512 6040289d134f65896f2fb80538d9caa4ce628911c5ed21568a30087d1b0ffb14b9acbf874956720b1d9c56290c78bb965ac9299bc400fd89a258f3627180780a
+DIST pytest-timeout-1.4.2.tar.gz 15424 BLAKE2B b7ab91833e59af56ae50c066c14bb9b8ae9995d1586f35b29f107665d7da124828d7accc1b0149702f2973c61f18024739c68de736ae8aae6f55e8a10bf5d4ff SHA512 3446ecdb5aaad5fbca12df4e7f4f40c6c1a12895d3ed9f3a3ee24800ce36deed3cb8c09a4cc72220c962b06f821cfd55bf7eebbca23664c56abf2d0e5bc8fbea
+EBUILD pytest-timeout-1.3.4.ebuild 752 BLAKE2B 059b1014e51bccdddbad59eac0ad718b5523073b6b032838458ddc365897027eccac6ada911142b41d72443cbca27b9b81a248fb0d8b400bf03bcf695fb2b4b4 SHA512 0fc9cf5951d8faa9c6790ca875aa97653c6e6fdf08c73314b5c31589e891bada76e22a08da66ffdcf80b3bee2fabf706c8f7708ccf023cec0183cba33c495c94
+EBUILD pytest-timeout-1.4.2.ebuild 941 BLAKE2B 02338bfdcab14553372cf19dd990cf0cae211fa0c2f3a33b8dd8bfce2db713f8ddb11606b88005f15cbf803c607a9815aa47e0d0170881a9e2e796314af932bb SHA512 023668bf37770a54966a20bf6d1ffa44f3b87e93fdf906cb26072fe8a045c91c1f311a7a0e57199d331312061c4bcda63903d5dee4e30664091bd0ad8eb6d66b
+MISC metadata.xml 352 BLAKE2B c3aa8ea91e07badacd5ac6d00f8580b4a2616b3909ce79f56e9760af95597289379072b6e4cfd65e9da4306ec0f1b0c4a77a920ef8cc10821b83ee5013c0e5f4 SHA512 3459606d8b5c8b639ce59bc18c85581076f10384d42cb00288a88159fdeb7c30cf51efec99e1696c69b69793da42ea25bab3674343629b1bd979f8836bc488dd
diff --git a/dev-python/pytest-timeout/files/pytest-timeout-1.3.3-tests.patch b/dev-python/pytest-timeout/files/pytest-timeout-1.3.3-tests.patch
deleted file mode 100644
index d3fa9ca0fd34..000000000000
--- a/dev-python/pytest-timeout/files/pytest-timeout-1.3.3-tests.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -ur pytest-timeout-1.3.3.orig/test_pytest_timeout.py pytest-timeout-1.3.3/test_pytest_timeout.py
---- pytest-timeout-1.3.3.orig/test_pytest_timeout.py 2018-11-16 03:41:33.000000000 -0800
-+++ pytest-timeout-1.3.3/test_pytest_timeout.py 2019-11-21 22:34:08.429287370 -0800
-@@ -1,4 +1,5 @@
- import os
-+import platform
- import os.path
- import signal
- import time
-@@ -93,6 +94,6 @@
- # assert 'Timeout' in result.stdout.str() + result.stderr.str()
-
-
--@pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread'])
-+@pytest.mark.parametrize('meth', [pytest.param('signal', marks=have_sigalrm), 'thread'])
- @pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session'])
- def test_fix_setup(meth, scope, testdir):
-@@ -133,6 +134,6 @@
- assert 'Timeout' not in result.stdout.str() + result.stderr.str()
-
-
--@pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread'])
-+@pytest.mark.parametrize('meth', [pytest.param('signal', marks=have_sigalrm), 'thread'])
- @pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session'])
- def test_fix_finalizer(meth, scope, testdir):
diff --git a/dev-python/pytest-timeout/files/pytest-timeout-1.4.2-optional-cov.patch b/dev-python/pytest-timeout/files/pytest-timeout-1.4.2-optional-cov.patch
new file mode 100644
index 000000000000..424cfa6c57d4
--- /dev/null
+++ b/dev-python/pytest-timeout/files/pytest-timeout-1.4.2-optional-cov.patch
@@ -0,0 +1,27 @@
+From 65a79fe8ceb52d7ae978f4a2ecc47a1fd34fda2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 2 Aug 2020 00:11:53 +0200
+Subject: [PATCH] Skip test_cov if pytest-cov is not installed
+
+Skip test_cov gracefully if pytest_cov module can't be imported.
+This would help us since we're removing py2 support from pytest-cov
+but still need it for pytest-timeout.
+---
+ test_pytest_timeout.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/test_pytest_timeout.py b/test_pytest_timeout.py
+index 16302d7..69707b4 100644
+--- a/test_pytest_timeout.py
++++ b/test_pytest_timeout.py
+@@ -77,6 +77,7 @@ def test_thread(testdir):
+ )
+ def test_cov(testdir):
+ # This test requires pytest-cov
++ pytest.importorskip("pytest_cov")
+ testdir.makepyfile(
+ """
+ import time
+--
+2.28.0
+
diff --git a/dev-python/pytest-timeout/metadata.xml b/dev-python/pytest-timeout/metadata.xml
index 53c928b91c5a..628e655974c4 100644
--- a/dev-python/pytest-timeout/metadata.xml
+++ b/dev-python/pytest-timeout/metadata.xml
@@ -5,6 +5,7 @@
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
+ <stabilize-allarches/>
<upstream>
<remote-id type="pypi">pytest-timeout</remote-id>
</upstream>
diff --git a/dev-python/pytest-timeout/pytest-timeout-1.3.3.ebuild b/dev-python/pytest-timeout/pytest-timeout-1.3.3.ebuild
deleted file mode 100644
index 2b7786b403a9..000000000000
--- a/dev-python/pytest-timeout/pytest-timeout-1.3.3.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python{2_7,3_{6,7,8}} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="py.test plugin to abort hanging tests"
-HOMEPAGE="https://pypi.org/project/pytest-timeout/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-SLOT="0"
-LICENSE="MIT"
-KEYWORDS="~alpha amd64 arm arm64 hppa ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
-
-RDEPEND="dev-python/pytest[${PYTHON_USEDEP}]"
-BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-
-PATCHES=(
- "${FILESDIR}/pytest-timeout-1.3.3-tests.patch"
-)
-
-python_test() {
- distutils_install_for_testing
-
- pytest -vv || die "Tests fail with ${EPYTHON}"
-}
diff --git a/dev-python/pytest-timeout/pytest-timeout-1.3.4.ebuild b/dev-python/pytest-timeout/pytest-timeout-1.3.4.ebuild
index 7b3e50afe479..bbad0c154fcf 100644
--- a/dev-python/pytest-timeout/pytest-timeout-1.3.4.ebuild
+++ b/dev-python/pytest-timeout/pytest-timeout-1.3.4.ebuild
@@ -14,7 +14,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
SLOT="0"
LICENSE="MIT"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="test"
RESTRICT="!test? ( test )"
diff --git a/dev-python/pytest-timeout/pytest-timeout-1.4.0.ebuild b/dev-python/pytest-timeout/pytest-timeout-1.4.0.ebuild
deleted file mode 100644
index 7b3e50afe479..000000000000
--- a/dev-python/pytest-timeout/pytest-timeout-1.4.0.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python{2_7,3_{6,7,8,9}} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="py.test plugin to abort hanging tests"
-HOMEPAGE="https://pypi.org/project/pytest-timeout/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-SLOT="0"
-LICENSE="MIT"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="dev-python/pytest[${PYTHON_USEDEP}]"
-BDEPEND="
- test? (
- ${RDEPEND}
- dev-python/pexpect[${PYTHON_USEDEP}]
- )"
-
-python_test() {
- distutils_install_for_testing
-
- pytest -vv || die "Tests fail with ${EPYTHON}"
-}
diff --git a/dev-python/pytest-timeout/pytest-timeout-1.4.1.ebuild b/dev-python/pytest-timeout/pytest-timeout-1.4.2.ebuild
index acb582e46efc..2821063d3083 100644
--- a/dev-python/pytest-timeout/pytest-timeout-1.4.1.ebuild
+++ b/dev-python/pytest-timeout/pytest-timeout-1.4.2.ebuild
@@ -15,18 +15,23 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
SLOT="0"
LICENSE="MIT"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="test"
-RESTRICT="!test? ( test )"
-RDEPEND="dev-python/pytest[${PYTHON_USEDEP}]"
+# do not rdepend on pytest, it won't be used without it anyway
# pytest-cov used to test compatibility
BDEPEND="
test? (
- ${RDEPEND}
dev-python/pexpect[${PYTHON_USEDEP}]
- dev-python/pytest-cov[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/pytest-cov[${PYTHON_USEDEP}]
+ ' -3)
)"
+distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/pytest-timeout-1.4.2-optional-cov.patch
+)
+
python_test() {
distutils_install_for_testing