From 76a8e797eaa2aaa1966cbba2c401d51aaee9787e8d67b590620286f321075d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 23 Apr 2020 10:32:49 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-openapi-spec-validator?expand=0&rev=12 --- python-openapi-spec-validator.changes | 5 +++++ python-openapi-spec-validator.spec | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/python-openapi-spec-validator.changes b/python-openapi-spec-validator.changes index 5e67fe8..153b5a6 100644 --- a/python-openapi-spec-validator.changes +++ b/python-openapi-spec-validator.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Apr 23 10:32:07 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Wed Sep 11 08:33:01 UTC 2019 - Tomáš Chvátal diff --git a/python-openapi-spec-validator.spec b/python-openapi-spec-validator.spec index b1a1325..25dc98c 100644 --- a/python-openapi-spec-validator.spec +++ b/python-openapi-spec-validator.spec @@ -1,7 +1,7 @@ # # spec file for package python-openapi-spec-validator # -# 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-openapi-spec-validator Version: 0.2.8 Release: 0 Summary: Python module for validating OpenAPI Specs against Swagger and OAS3 License: Apache-2.0 -Group: Development/Languages/Python URL: https://github.com/p1c2u/openapi-spec-validator Source: https://github.com/p1c2u/openapi-spec-validator/archive/%{version}.tar.gz Patch0: openapi-spec-validator-skip-urls.patch @@ -33,7 +33,6 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes -BuildRequires: python-pathlib2 BuildRequires: python-rpm-macros Requires: python-PyYAML >= 5.1 Requires: python-jsonschema @@ -42,6 +41,9 @@ Requires: python-six Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch +%if %{with python2} +BuildRequires: python-pathlib2 +%endif %ifpython2 Requires: python-pathlib2 %endif