From 0404c37c3bff4d9b21073a200620bb78034781054f2402c8ee2d65e7d6b89471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 14 Mar 2020 08:32:33 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=34 --- python-isort.changes | 5 +++++ python-isort.spec | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/python-isort.changes b/python-isort.changes index 900f8ce..c719935 100644 --- a/python-isort.changes +++ b/python-isort.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 14 08:32:17 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Thu Sep 12 17:51:02 UTC 2019 - Tomáš Chvátal diff --git a/python-isort.spec b/python-isort.spec index 27a26d6..37cd3f1 100644 --- a/python-isort.spec +++ b/python-isort.spec @@ -1,7 +1,7 @@ # # spec file for package python-isort # -# 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 @@ -25,17 +25,16 @@ %define psuffix %{nil} %bcond_with test %endif +%bcond_without python2 Name: python-isort%{psuffix} Version: 4.3.21 Release: 0 Summary: A Python utility / library to sort Python imports License: MIT -Group: Development/Languages/Python URL: https://github.com/timothycrosley/isort Source: https://files.pythonhosted.org/packages/source/i/isort/isort-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes -BuildRequires: python-futures BuildRequires: python-rpm-macros Requires: python-setuptools Recommends: python-appdirs >= 1.4.0 @@ -44,6 +43,10 @@ Recommends: python-pipreqs Recommends: python-requirementslib Recommends: python-toml BuildArch: noarch +%if %{with python2} +BuildRequires: python-backports.functools_lru_cache +BuildRequires: python-futures +%endif %if %{with test} BuildRequires: %{python_module appdirs >= 1.4.0} BuildRequires: %{python_module mock} @@ -53,7 +56,6 @@ BuildRequires: %{python_module pylama} BuildRequires: %{python_module pytest} BuildRequires: %{python_module requirementslib} BuildRequires: %{python_module toml} -BuildRequires: python-backports.functools_lru_cache %endif %ifpython2 Requires: python-backports.functools_lru_cache