From b8ffa2ec8b797621cba685df1217b9bc37fe2e67cd90693a8a037bd7d54d42bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 23 Apr 2020 11:02:18 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-humanfriendly?expand=0&rev=30 --- python-humanfriendly.changes | 5 +++++ python-humanfriendly.spec | 3 +++ 2 files changed, 8 insertions(+) diff --git a/python-humanfriendly.changes b/python-humanfriendly.changes index 74b3563..931a9a1 100644 --- a/python-humanfriendly.changes +++ b/python-humanfriendly.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Apr 23 11:01:33 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Mon Mar 30 09:38:31 UTC 2020 - Marketa Calabkova diff --git a/python-humanfriendly.spec b/python-humanfriendly.spec index 80b105e..ba22396 100644 --- a/python-humanfriendly.spec +++ b/python-humanfriendly.spec @@ -24,6 +24,7 @@ %define psuffix %{nil} %bcond_with test %endif +%bcond_without python2 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-humanfriendly%{psuffix} Version: 8.1 @@ -47,8 +48,10 @@ BuildRequires: %{python_module mock} BuildRequires: %{python_module pytest >= 3.0.7} BuildRequires: %{python_module pytest-cov >= 2.4.0} BuildRequires: %{pythons} +%if %{with python2} BuildRequires: python2-monotonic %endif +%endif %ifpython2 Requires: python-monotonic %endif