From 41ea1e05f145e8de79d989208a7ae3b8e297d6cf57933cdf015368cead4d9ffa 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:35:36 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-invocations?expand=0&rev=16 --- python-invocations.changes | 5 +++++ python-invocations.spec | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/python-invocations.changes b/python-invocations.changes index 6e13874..c5b3a80 100644 --- a/python-invocations.changes +++ b/python-invocations.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 14 08:35:22 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Thu Jul 4 12:02:23 UTC 2019 - Tomáš Chvátal diff --git a/python-invocations.spec b/python-invocations.spec index 296861b..81e9742 100644 --- a/python-invocations.spec +++ b/python-invocations.spec @@ -1,7 +1,7 @@ # # spec file for package python-invocations # -# 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,12 +17,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-invocations Version: 1.4.0 Release: 0 Summary: Reusable Invoke tasks License: BSD-2-Clause -Group: Development/Languages/Python URL: https://github.com/pyinvoke/invocations Source: https://github.com/pyinvoke/invocations/archive/%{version}.tar.gz Patch0: invocations-no-bundled.patch @@ -41,7 +41,6 @@ BuildRequires: %{python_module tabulate >= 0.7.5} BuildRequires: %{python_module tqdm >= 4.8.1} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: python2-enum34 Requires: python-blessings >= 1.6 Requires: python-invoke >= 1.0 Requires: python-lexicon @@ -51,6 +50,9 @@ Requires: python-six Requires: python-tabulate >= 0.7.5 Requires: python-tqdm >= 4.8.1 BuildArch: noarch +%if %{with python2} +BuildRequires: python-enum34 +%endif %ifpython2 Requires: python-enum34 %endif