From 574f8da21986658633eec55ea83089ce5d67f7ceed370e38621f0a98d0a8e0f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 11 Mar 2020 17:30:07 +0000 Subject: [PATCH] - Fix build without python2 available OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-freezegun?expand=0&rev=30 --- python-freezegun.changes | 5 +++++ python-freezegun.spec | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/python-freezegun.changes b/python-freezegun.changes index f0e9d7b..c408d97 100644 --- a/python-freezegun.changes +++ b/python-freezegun.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 11 17:29:52 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 available + ------------------------------------------------------------------- Wed Mar 11 08:59:55 UTC 2020 - Dirk Mueller diff --git a/python-freezegun.spec b/python-freezegun.spec index db7106a..8975051 100644 --- a/python-freezegun.spec +++ b/python-freezegun.spec @@ -17,12 +17,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-freezegun Version: 0.3.15 Release: 0 Summary: Mock time date for Python License: Apache-2.0 -Group: Development/Languages/Python URL: https://github.com/spulec/freezegun Source: https://files.pythonhosted.org/packages/source/f/freezegun/freezegun-%{version}.tar.gz # gh#spulec/freezegun#259 @@ -32,15 +32,15 @@ BuildRequires: %{python_module python-dateutil > 2.0} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: %{pythons} -%ifpython2 -BuildRequires: python-mock -%endif BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python Requires: python-python-dateutil > 2.0 Requires: python-six BuildArch: noarch +%if %{with python2} +BuildRequires: python-mock +%endif %python_subpackages %description