From adfe849b41cf6120ae81e5b6942c6be76106f1ae Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Thu, 4 Nov 2021 01:15:21 -0400 Subject: [PATCH] import python-pytest-timeout-1.4.2-7.el9 --- .gitignore | 1 + .python-pytest-timeout.metadata | 1 + ...-Remove-test-only-dependency-pexpect.patch | 28 ++++ SPECS/python-pytest-timeout.spec | 157 ++++++++++++++++++ 4 files changed, 187 insertions(+) create mode 100644 .gitignore create mode 100644 .python-pytest-timeout.metadata create mode 100644 SOURCES/0001-Remove-test-only-dependency-pexpect.patch create mode 100644 SPECS/python-pytest-timeout.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2bb3682 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/pytest-timeout-1.4.2.tar.gz diff --git a/.python-pytest-timeout.metadata b/.python-pytest-timeout.metadata new file mode 100644 index 0000000..0e47f2a --- /dev/null +++ b/.python-pytest-timeout.metadata @@ -0,0 +1 @@ +56df6d5116a97976f2cfb896b13708999c614332 SOURCES/pytest-timeout-1.4.2.tar.gz diff --git a/SOURCES/0001-Remove-test-only-dependency-pexpect.patch b/SOURCES/0001-Remove-test-only-dependency-pexpect.patch new file mode 100644 index 0000000..592716d --- /dev/null +++ b/SOURCES/0001-Remove-test-only-dependency-pexpect.patch @@ -0,0 +1,28 @@ +From 787944c580596237b732e227075e9e9e257681a6 Mon Sep 17 00:00:00 2001 +From: Tomas Orsava +Date: Tue, 15 Jun 2021 11:15:19 +0200 +Subject: [PATCH] Remove test-only dependency pexpect + +--- + test_pytest_timeout.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/test_pytest_timeout.py b/test_pytest_timeout.py +index 16302d7..fe0dd05 100644 +--- a/test_pytest_timeout.py ++++ b/test_pytest_timeout.py +@@ -3,7 +3,10 @@ import signal + import sys + import time + +-import pexpect ++try: ++ import pexpect ++except ImportError: ++ pexpect = None # does not have spawn :) + import pytest + + pytest_plugins = "pytester" +-- +2.31.1 + diff --git a/SPECS/python-pytest-timeout.spec b/SPECS/python-pytest-timeout.spec new file mode 100644 index 0000000..26bca0b --- /dev/null +++ b/SPECS/python-pytest-timeout.spec @@ -0,0 +1,157 @@ +%global pypi_name pytest-timeout + +Name: python-%{pypi_name} +Version: 1.4.2 +Release: 7%{?dist} +Summary: py.test plugin to abort hanging tests + +License: MIT +URL: https://github.com/pytest-dev/pytest-timeout +Source0: %{pypi_source} + +# This patch skips 3 tests out of 38 because of missing dependency +# python-pexpect in RHEL 9 +Patch1: 0001-Remove-test-only-dependency-pexpect.patch + +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: %{py3_dist pytest} >= 3.6.0 +BuildRequires: %{py3_dist setuptools} + +%global _description %{expand: +This is a plugin which will terminate tests after a certain timeout. When doing +so it will show a stack dump of all threads running at the time. This is useful +when running tests under a continuous integration server or simply if you don’t +know why the test suite hangs.} + +%description %_description + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} %_description + +%prep +%autosetup -p1 -n %{pypi_name}-%{version} + +%build +%py3_build + +%install +%py3_install + +%check +%pytest -k "not test_cov" + + +%files -n python3-%{pypi_name} +%doc README.rst +%license LICENSE +%{python3_sitelib}/pytest_timeout* +%{python3_sitelib}/__pycache__/pytest_timeout* + +%changelog +* Tue Aug 10 2021 Mohan Boddu - 1.4.2-7 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Tue Jun 15 2021 Tomas Orsava - 1.4.2-6 +- Remove test-dependency on python-pexpect + +* Fri Apr 16 2021 Mohan Boddu - 1.4.2-5 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Mar 30 2021 Miro Hrončok - 1.4.2-4 +- Don't BuildRequire python3-pytest-cov +Resolves: rhbz#1945252 + +* Wed Jan 27 2021 Fedora Release Engineering - 1.4.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1.4.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 15 2020 Scott Talbert - 1.4.2-1 +- Update to new upstream release 1.4.2 (#1857421) + +* Fri Jun 26 2020 Scott Talbert - 1.4.1-2 +- Add missing BR for setuptools + +* Tue Jun 16 2020 Scott Talbert - 1.4.1-1 +- Update to new upstream release 1.4.1 (#1846923) +- Modernize packaging + +* Sat May 23 2020 Miro Hrončok - 1.3.4-3 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.3.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Jan 07 2020 Scott Talbert - 1.3.4-1 +- Update to new upstream release (#1788278) + +* Thu Oct 03 2019 Miro Hrončok - 1.3.3-7 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Sat Aug 17 2019 Miro Hrončok - 1.3.3-6 +- Rebuilt for Python 3.8 + +* Thu Aug 08 2019 Scott Talbert - 1.3.3-5 +- Remove Python 2 subpackages (#1737398) + +* Fri Jul 26 2019 Fedora Release Engineering - 1.3.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Apr 04 2019 Miro Hrončok - 1.3.3-3 +- Add upstream patch for pytest 4 compatibility + +* Sat Feb 02 2019 Fedora Release Engineering - 1.3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jan 25 2019 Scott Talbert - 1.3.3-1 +- New upstream release 1.3.3 + +* Tue Oct 23 2018 Scott Talbert - 1.3.2-1 +- New upstream release 1.3.2 + +* Fri Sep 14 2018 Scott Talbert - 1.3.1-2 +- Disable writing bytecode when running tests to avoid packaging pycache files + +* Tue Jul 24 2018 Scott Talbert - 1.3.1-1 +- New upstream release 1.3.1 + +* Sat Jul 14 2018 Fedora Release Engineering - 1.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Jun 27 2018 Scott Talbert - 1.3.0-1 +- New upstream release 1.3.0 + +* Mon Jun 18 2018 Miro Hrončok - 1.2.1-2 +- Rebuilt for Python 3.7 + +* Wed Jun 13 2018 Scott Talbert - 1.2.1-1 +- New upstream release 1.2.1 (fixes FTBFS #1590256) + +* Fri Feb 09 2018 Fedora Release Engineering - 1.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Jul 28 2017 Scott Talbert - 1.2.0-3 +- Updated to use versioned dependency name + +* Thu Jul 27 2017 Fedora Release Engineering - 1.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed May 10 2017 Scott Talbert - 1.2.0-1 +- New upstream release 1.2.0 +- Enable tests + +* Sat Feb 11 2017 Fedora Release Engineering - 1.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Dec 13 2016 Stratakis Charalampos - 1.0.0-2 +- Rebuild for Python 3.6 + +* Thu Aug 11 2016 Scott Talbert - 1.0.0-1 +- Initial package.