diff --git a/144.patch b/144.patch new file mode 100644 index 0000000..84a8bca --- /dev/null +++ b/144.patch @@ -0,0 +1,22 @@ +From 2d6709e2fc7fba1e0d61e8dad03fa68bf19a9b0f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Sun, 18 Aug 2019 10:46:37 +0200 +Subject: [PATCH] pytest-shutil: Only require contextlib2 on Python 2 + +--- + pytest-shutil/setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pytest-shutil/setup.py b/pytest-shutil/setup.py +index 70cc354..57f710d 100644 +--- a/pytest-shutil/setup.py ++++ b/pytest-shutil/setup.py +@@ -24,7 +24,7 @@ + + install_requires = ['six', + 'execnet', +- 'contextlib2', ++ 'contextlib2;python_version<"3"', + 'pytest', + 'path.py', + 'mock', diff --git a/python-pytest-shutil.spec b/python-pytest-shutil.spec index 7b36c60..311e140 100644 --- a/python-pytest-shutil.spec +++ b/python-pytest-shutil.spec @@ -3,12 +3,13 @@ Name: python-%{srcname} Version: 1.7.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: %{sum} License: MIT URL: https://pypi.python.org/pypi/%{srcname} Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +Patch1: https://github.com/manahl/pytest-plugins/pull/144.patch BuildArch: noarch BuildRequires: python3-devel @@ -17,7 +18,6 @@ BuildRequires: python3-six BuildRequires: python3-setuptools_git BuildRequires: python3-mock BuildRequires: python3-path -BuildRequires: python3-contextlib2 BuildRequires: python3-execnet BuildRequires: python3-termcolor @@ -35,7 +35,7 @@ This library is a goodie-bag of Unix shell and environment management tools for automated tests. %prep -%autosetup -n %{srcname}-%{version} -p1 +%autosetup -n %{srcname}-%{version} -p2 # https://bugzilla.redhat.com/show_bug.cgi?id=1702355 sed -i "/'termcolor'/d" setup.py @@ -59,6 +59,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest %{python3_sitelib}/* %changelog +* Sun Aug 18 2019 Miro Hrončok - 1.7.0-5 +- Drop requirement on contextlib2, contextlib is in the Python 3 stdlib + * Sat Aug 17 2019 Miro Hrončok - 1.7.0-4 - Rebuilt for Python 3.8