From 548557299b62e1ed3ce24d21559870ea4b8d16a40faa142ea11ab1720e83c1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 20 Apr 2020 10:38:15 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyKMIP?expand=0&rev=7 --- python-PyKMIP.changes | 5 +++++ python-PyKMIP.spec | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/python-PyKMIP.changes b/python-PyKMIP.changes index 4872ef3..c25646e 100644 --- a/python-PyKMIP.changes +++ b/python-PyKMIP.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 20 10:38:03 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Mon Mar 16 10:39:58 UTC 2020 - Dirk Mueller diff --git a/python-PyKMIP.spec b/python-PyKMIP.spec index 3ba04fd..a58c583 100644 --- a/python-PyKMIP.spec +++ b/python-PyKMIP.spec @@ -17,6 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-PyKMIP Version: 0.10.0 Release: 0 @@ -36,17 +37,19 @@ BuildRequires: %{python_module six} BuildRequires: %{python_module testtools} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: python2-enum34 Requires: python-SQLAlchemy Requires: python-cryptography Requires: python-requests Requires: python-six -%ifpython2 -Requires: python-enum34 -%endif Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch +%if %{with python2} +BuildRequires: python-enum34 +%endif +%ifpython2 +Requires: python-enum34 +%endif %python_subpackages %description