From 0413a013ae7d22eeceed245d7d3e16dfe0ae339f1a0be0db8ebcd282fadba118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 20 Apr 2020 12:01:49 +0000 Subject: [PATCH] - Fix build wihtout python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fs?expand=0&rev=23 --- python-fs.changes | 5 +++++ python-fs.spec | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/python-fs.changes b/python-fs.changes index 6cb0899..76bc626 100644 --- a/python-fs.changes +++ b/python-fs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 20 12:01:32 UTC 2020 - Tomáš Chvátal + +- Fix build wihtout python2 + ------------------------------------------------------------------- Thu Sep 12 12:00:45 UTC 2019 - Tomáš Chvátal diff --git a/python-fs.spec b/python-fs.spec index 36ee43b..d71182c 100644 --- a/python-fs.spec +++ b/python-fs.spec @@ -1,7 +1,7 @@ # # spec file for package python-fs # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2016 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties @@ -18,6 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-fs Version: 2.4.11 Release: 0 @@ -38,9 +39,6 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six >= 1.10.0} BuildRequires: %{python_module typing >= 3.6} BuildRequires: fdupes -BuildRequires: python-backports.os >= 0.1 -BuildRequires: python-enum34 >= 1.1.6 -BuildRequires: python-mock BuildRequires: python-rpm-macros Requires: python-appdirs >= 1.4.3 Requires: python-psutil @@ -50,6 +48,11 @@ Requires: python-six >= 1.10.0 Requires: python-typing >= 3.6 Recommends: python-pyftpdlib BuildArch: noarch +%if %{with python2} +BuildRequires: python-backports.os >= 0.1 +BuildRequires: python-enum34 >= 1.1.6 +BuildRequires: python-mock +%endif %ifpython2 Requires: python-backports.os >= 0.1 %endif