From 3c9fca6fefe7295107e589ddf482de28ecd6f10a486e346e6a1163bf4dc36557 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:42:46 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fido2?expand=0&rev=17 --- python-fido2.changes | 5 +++++ python-fido2.spec | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/python-fido2.changes b/python-fido2.changes index 31f64b0..6965b1f 100644 --- a/python-fido2.changes +++ b/python-fido2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 20 12:42:34 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Sun Dec 8 23:05:47 UTC 2019 - Karol Babioch diff --git a/python-fido2.spec b/python-fido2.spec index a5d8ee6..b2abe3c 100644 --- a/python-fido2.spec +++ b/python-fido2.spec @@ -1,7 +1,7 @@ # # spec file for package python-fido2 # -# 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,13 +17,14 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-fido2 Version: 0.8.1 Release: 0 Summary: Python-based FIDO 2.0 library License: BSD-2-Clause AND BSD-3-Clause AND Apache-2.0 AND MPL-2.0 Group: Development/Languages/Python -Url: https://github.com/Yubico/python-fido2 +URL: https://github.com/Yubico/python-fido2 Source0: https://github.com/Yubico/python-fido2/releases/download/%{version}/fido2-%{version}.tar.gz Source1: https://github.com/Yubico/python-fido2/releases/download/%{version}/fido2-%{version}.tar.gz.sig BuildRequires: %{python_module cryptography >= 1.5} @@ -33,10 +34,12 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: python2-enum34 Requires: python-cryptography >= 1.5 Requires: python-six BuildArch: noarch +%if %{with python2} +BuildRequires: python2-enum34 +%endif %ifpython2 Requires: python2-enum34 %endif