From aaedbeddd41376a6507fbcfa913b99385abde399fa3bac5dd6551180f4a9b136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 20 Apr 2020 07:24:27 +0000 Subject: [PATCH] - Fix build without python2 available OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wurlitzer?expand=0&rev=9 --- python-wurlitzer.changes | 5 +++++ python-wurlitzer.spec | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/python-wurlitzer.changes b/python-wurlitzer.changes index 4434be6..da710d5 100644 --- a/python-wurlitzer.changes +++ b/python-wurlitzer.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 20 07:24:10 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 available + ------------------------------------------------------------------- Wed Nov 6 12:18:11 UTC 2019 - Tomáš Chvátal diff --git a/python-wurlitzer.spec b/python-wurlitzer.spec index e491189..460a59b 100644 --- a/python-wurlitzer.spec +++ b/python-wurlitzer.spec @@ -1,7 +1,7 @@ # # spec file for package python-wurlitzer # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,6 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-wurlitzer Version: 2.0.0 Release: 0 @@ -29,8 +30,10 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: python-selectors2 BuildArch: noarch +%if %{with python2} +BuildRequires: python-selectors2 +%endif %ifpython2 Requires: python-selectors2 %endif