From 0807a19cf503fce363865f3693fee4f5e6661ff5cbb6f960d176a2d9c706c728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 14 Mar 2020 07:12:28 +0000 Subject: [PATCH] - Fix building without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-serpent?expand=0&rev=11 --- python-serpent.changes | 5 +++++ python-serpent.spec | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/python-serpent.changes b/python-serpent.changes index 3d45f51..1340b96 100644 --- a/python-serpent.changes +++ b/python-serpent.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 14 07:12:14 UTC 2020 - Tomáš Chvátal + +- Fix building without python2 + ------------------------------------------------------------------- Tue Apr 2 06:58:58 UTC 2019 - pgajdos@suse.com diff --git a/python-serpent.spec b/python-serpent.spec index da41dd0..dc191f7 100644 --- a/python-serpent.spec +++ b/python-serpent.spec @@ -1,7 +1,7 @@ # # spec file for package python-serpent # -# 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,24 +17,26 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-serpent Version: 1.28 Release: 0 Summary: Serialization based on astliteral_eval License: MIT -Group: Development/Languages/Python URL: https://github.com/irmen/Serpent Source: https://files.pythonhosted.org/packages/source/s/serpent/serpent-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes -BuildRequires: python-enum34 BuildRequires: python-rpm-macros +BuildArch: noarch +%if %{with python2} +BuildRequires: python-enum34 +%endif # SECTION test requirements BuildRequires: %{python_module attrs} BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytz} # /SECTION -BuildArch: noarch %ifpython2 Requires: python-enum34 %endif