From 608da8456c02b10935bd6fb4e7d0d69d3ef814d85ae9a693c1c98efa8cd2b74d 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:06:36 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8-import-order?expand=0&rev=15 --- python-flake8-import-order.changes | 5 +++++ python-flake8-import-order.spec | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/python-flake8-import-order.changes b/python-flake8-import-order.changes index 13df1a9..5286872 100644 --- a/python-flake8-import-order.changes +++ b/python-flake8-import-order.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 20 12:06:21 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Tue Mar 12 15:18:04 UTC 2019 - Tomáš Chvátal diff --git a/python-flake8-import-order.spec b/python-flake8-import-order.spec index c454722..be21442 100644 --- a/python-flake8-import-order.spec +++ b/python-flake8-import-order.spec @@ -1,7 +1,7 @@ # # spec file for package python-flake8-import-order # -# 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-flake8-import-order Version: 0.18.1 Release: 0 @@ -32,10 +33,12 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: python2-enum34 Requires: python-flake8 Requires: python-pycodestyle BuildArch: noarch +%if %{with python2} +BuildRequires: python2-enum34 +%endif %ifpython2 Requires: python2-enum34 %endif