From 253d10cde6f19833df518b8f29bc313c1d2ded800b3656476fd3525dee09e87a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 16 Mar 2020 10:26:57 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CommonMark?expand=0&rev=21 --- python-CommonMark.changes | 5 +++++ python-CommonMark.spec | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/python-CommonMark.changes b/python-CommonMark.changes index 1c0317f..402c84a 100644 --- a/python-CommonMark.changes +++ b/python-CommonMark.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 16 10:26:20 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Mon Oct 7 13:31:14 UTC 2019 - Tomáš Chvátal diff --git a/python-CommonMark.spec b/python-CommonMark.spec index 85db6b8..6faaa46 100644 --- a/python-CommonMark.spec +++ b/python-CommonMark.spec @@ -1,7 +1,7 @@ # # spec file for package python-CommonMark # -# 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 @@ -18,22 +18,24 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python +%bcond_without python2 Name: python-CommonMark Version: 0.9.1 Release: 0 Summary: Python parser for the CommonMark Markdown spec License: BSD-3-Clause -Group: Development/Languages/Python URL: https://github.com/rtfd/CommonMark-py Source: https://files.pythonhosted.org/packages/source/c/commonmark/commonmark-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes -BuildRequires: python-future >= 0.14.0 BuildRequires: python-rpm-macros Requires: python-setuptools Provides: python-commonmark = %{version} Obsoletes: python-commonmark < %{version} BuildArch: noarch +%if %{with python2} +BuildRequires: python-future >= 0.14.0 +%endif %ifpython2 Requires: python-future >= 0.14.0 Obsoletes: %{oldpython}-commonmark < %{version}