From 4732f4f7a5f3bfc85df4c323c1938c8344e84db3da8ec9db437571d38115c745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 14 Mar 2020 08:12:50 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Logbook?expand=0&rev=17 --- python-Logbook.changes | 5 +++++ python-Logbook.spec | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/python-Logbook.changes b/python-Logbook.changes index 80c5de3..fd8eb9d 100644 --- a/python-Logbook.changes +++ b/python-Logbook.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 14 08:12:35 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Wed Jan 15 10:46:40 UTC 2020 - Marketa Calabkova diff --git a/python-Logbook.spec b/python-Logbook.spec index 3c2e4b9..9497d86 100644 --- a/python-Logbook.spec +++ b/python-Logbook.spec @@ -17,12 +17,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-Logbook Version: 1.5.3 Release: 0 Summary: A logging replacement for Python License: BSD-3-Clause -Group: Development/Languages/Python URL: https://github.com/getlogbook/logbook Source: https://files.pythonhosted.org/packages/source/L/Logbook/Logbook-%{version}.tar.gz BuildRequires: %{python_module Brotli} @@ -40,7 +40,6 @@ BuildRequires: %{python_module redis} BuildRequires: %{python_module setuptools} BuildRequires: dos2unix BuildRequires: fdupes -BuildRequires: python-mock BuildRequires: python-rpm-macros BuildRequires: redis BuildRequires: util-linux @@ -50,6 +49,9 @@ Recommends: python-execnet >= 1.0.9 Recommends: python-gevent Recommends: python-pyzmq Recommends: python-redis +%if %{with python2} +BuildRequires: python-mock +%endif %python_subpackages %description