diff --git a/python-genty.changes b/python-genty.changes index 70b3d08..43ff0b1 100644 --- a/python-genty.changes +++ b/python-genty.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon Dec 14 00:46:41 UTC 2020 - Benjamin Greiner + +- Fix condition around BuildRequirement + +------------------------------------------------------------------- +Sun Dec 13 19:33:37 UTC 2020 - Matej Cepl + +- We don't need to break Python 2.7 + ------------------------------------------------------------------- Tue Dec 8 07:55:53 UTC 2020 - Matej Cepl diff --git a/python-genty.spec b/python-genty.spec index 9454bfe..4e7502d 100644 --- a/python-genty.spec +++ b/python-genty.spec @@ -31,6 +31,9 @@ Patch0: remove_mock.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} +%if 0%{?suse_version} <= 1500 +BuildRequires: python-mock +%endif BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-six diff --git a/remove_mock.patch b/remove_mock.patch index 497ffd2..b9d2879 100644 --- a/remove_mock.patch +++ b/remove_mock.patch @@ -1,11 +1,14 @@ --- a/test/test_genty.py +++ b/test/test_genty.py -@@ -3,7 +3,7 @@ +@@ -3,7 +3,10 @@ from __future__ import unicode_literals import functools import inspect -from mock import patch -+from unittest.mock import patch ++try: ++ from unittest.mock import patch ++except ImportError: ++ from mock import patch import six from genty import genty, genty_args, genty_dataset, genty_repeat, genty_dataprovider from genty.genty import REPLACE_FOR_PERIOD_CHAR