From d85aa3fe433bf16c5e4f26f4401d355a3ce90c6d13215542c28a212e828d17a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 16 Mar 2020 10:23:26 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cheroot?expand=0&rev=24 --- python-cheroot.changes | 5 +++++ python-cheroot.spec | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/python-cheroot.changes b/python-cheroot.changes index f2c0444..5abb667 100644 --- a/python-cheroot.changes +++ b/python-cheroot.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 16 10:23:16 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Sat Mar 7 14:09:21 UTC 2020 - Tomáš Chvátal diff --git a/python-cheroot.spec b/python-cheroot.spec index e3cff47..be7e3c2 100644 --- a/python-cheroot.spec +++ b/python-cheroot.spec @@ -18,6 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define pypi_name cheroot +%bcond_without python2 Name: python-%{pypi_name} Version: 8.3.0 Release: 0 @@ -39,7 +40,6 @@ BuildRequires: %{python_module setuptools_scm_git_archive >= 1.0} BuildRequires: %{python_module six >= 1.11.0} BuildRequires: %{python_module trustme} BuildRequires: fdupes -BuildRequires: python-backports.functools_lru_cache BuildRequires: python-rpm-macros Requires: python-jaraco.functools Requires: python-more-itertools >= 2.6 @@ -49,6 +49,9 @@ Requires: python-six >= 1.11.0 # *smacks head against desk* Provides: python-Cheroot = %{version} BuildArch: noarch +%if %{with python2} +BuildRequires: python-backports.functools_lru_cache +%endif %ifpython2 Requires: python-backports.functools_lru_cache %endif