From 11c2d4373e0602ccb4d649ee6036523375667b0e285a7d099a7138df83c0f4b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 12 Mar 2020 08:03:45 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tomlkit?expand=0&rev=10 --- python-tomlkit.changes | 5 +++++ python-tomlkit.spec | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/python-tomlkit.changes b/python-tomlkit.changes index 0093c6c..a295329 100644 --- a/python-tomlkit.changes +++ b/python-tomlkit.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 12 08:03:32 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Wed Mar 11 11:15:54 UTC 2020 - pgajdos@suse.com diff --git a/python-tomlkit.spec b/python-tomlkit.spec index 2a71999..c822372 100644 --- a/python-tomlkit.spec +++ b/python-tomlkit.spec @@ -17,22 +17,24 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-tomlkit Version: 0.5.11 Release: 0 Summary: Style preserving TOML library License: MIT -Group: Development/Languages/Python URL: https://github.com/sdispater/tomlkit Source: https://files.pythonhosted.org/packages/source/t/tomlkit/tomlkit-%{version}.tar.gz BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module typing >= 3.6} BuildRequires: fdupes -BuildRequires: python-enum34 -BuildRequires: python-functools32 BuildRequires: python-rpm-macros BuildArch: noarch +%if %{with python2} +BuildRequires: python-enum34 +BuildRequires: python-functools32 +%endif %ifpython2 Requires: python-enum34 Requires: python-functools32