From 44e3d14d757c2d8888b4f01d2af227f893bd0a90fd98e97b5c79c9469249b5eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 20 Apr 2020 11:47:39 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ifaddr?expand=0&rev=7 --- python-ifaddr.changes | 5 +++++ python-ifaddr.spec | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/python-ifaddr.changes b/python-ifaddr.changes index b5cc8c1..cc648fb 100644 --- a/python-ifaddr.changes +++ b/python-ifaddr.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 20 11:47:26 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Tue Mar 12 16:34:30 UTC 2019 - Tomáš Chvátal diff --git a/python-ifaddr.spec b/python-ifaddr.spec index 7845784..37b5926 100644 --- a/python-ifaddr.spec +++ b/python-ifaddr.spec @@ -1,7 +1,7 @@ # # spec file for package python-ifaddr # -# 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 @@ -16,8 +16,8 @@ # -%define oldpython python %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-ifaddr Version: 0.1.6 Release: 0 @@ -35,10 +35,12 @@ BuildRequires: unzip BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module pytest} +%if %{with python2} BuildRequires: python-ipaddress +%endif # /SECTION %ifpython2 -Requires: %{oldpython}-ipaddress +Requires: python-ipaddress %endif %python_subpackages