From 8d12a342e8a7010c0d0fefa06259066384fe31bc8b9f61098eb13cdfa71bfba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 21 Aug 2018 08:00:58 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-humanfriendly?expand=0&rev=12 --- python-humanfriendly.spec | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/python-humanfriendly.spec b/python-humanfriendly.spec index ff05475..5c7d541 100644 --- a/python-humanfriendly.spec +++ b/python-humanfriendly.spec @@ -16,18 +16,13 @@ # -%global flavor @BUILD_FLAVOR@%{nil} -%if "%{flavor}" == "test" +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" %bcond_without test %else -%bcond_with test -%endif -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%if %{with test} -Name: python-humanfriendly-%{flavor} -%else -Name: python-humanfriendly +%bcond_with test %endif +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Version: 4.16.1 Release: 0 Summary: Human friendly input/output for text interfaces using Python @@ -35,6 +30,17 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/xolox/python-humanfriendly Source: https://files.pythonhosted.org/packages/source/h/humanfriendly/humanfriendly-%{version}.tar.gz +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +%if %{with test} +Name: python-humanfriendly-%{flavor} +%else +Name: python-humanfriendly +%endif %if %{with test} BuildRequires: %{python_module capturer >= 2.1} BuildRequires: %{python_module coloredlogs >= 2} @@ -42,12 +48,6 @@ BuildRequires: %{python_module pytest >= 3.0.7} BuildRequires: %{python_module pytest-cov >= 2.4.0} BuildRequires: python2-monotonic %endif -BuildRequires: %{python_module setuptools} -BuildRequires: fdupes -BuildRequires: python-rpm-macros -Requires(post): update-alternatives -Requires(postun): update-alternatives -BuildArch: noarch %ifpython2 Requires: python-monotonic %endif