From 560bb96a242a1a4fee1bb7a9519cf157453478832df438a504bd76ddea5eef21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 10 Jan 2020 14:51:19 +0000 Subject: [PATCH] - Properly conditionalize the python2 drop so it lets us backport the packages OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-openapi-core?expand=0&rev=15 --- python-openapi-core.changes | 6 ++++++ python-openapi-core.spec | 19 +++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/python-openapi-core.changes b/python-openapi-core.changes index 3d942ad..e41228b 100644 --- a/python-openapi-core.changes +++ b/python-openapi-core.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 10 14:50:55 UTC 2020 - Tomáš Chvátal + +- Properly conditionalize the python2 drop so it lets us backport + the packages + ------------------------------------------------------------------- Thu Jan 9 18:01:55 UTC 2020 - Todd R diff --git a/python-openapi-core.spec b/python-openapi-core.spec index dad0df6..8cc3e01 100644 --- a/python-openapi-core.spec +++ b/python-openapi-core.spec @@ -1,7 +1,7 @@ # # spec file for package python-openapi-core # -# 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,7 +17,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 +%if 0%{?suse_version} > 1500 +%define skip_python2 1 +%bcond_with python2 +%else +%bcond_without python2 +%endif Name: python-openapi-core Version: 0.12.0 Release: 0 @@ -45,6 +50,16 @@ Requires: python-openapi-spec-validator Requires: python-six Requires: python-strict-rfc3339 BuildArch: noarch +%if %{with python2} +BuildRequires: python-backports.functools_lru_cache +BuildRequires: python-backports.functools_partialmethod +BuildRequires: python-enum34 +%endif +%ifpython2 +Requires: python-backports.functools_lru_cache +Requires: python-backports.functools_partialmethod +Requires: python-enum34 +%endif %python_subpackages %description