From 2514e71fe766b53d42ca9e5172194ad50082b5734a8221eb94bb98acd9b63a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 29 Mar 2019 10:46:34 +0000 Subject: [PATCH] - Simplify the multibuild conditioning and name creation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-humanfriendly?expand=0&rev=21 --- python-humanfriendly.changes | 5 +++++ python-humanfriendly.spec | 22 +++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/python-humanfriendly.changes b/python-humanfriendly.changes index 7f5cb91..82c0433 100644 --- a/python-humanfriendly.changes +++ b/python-humanfriendly.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Mar 29 10:46:17 UTC 2019 - Tomáš Chvátal + +- Simplify the multibuild conditioning and name creation + ------------------------------------------------------------------- Tue Mar 12 16:03:38 UTC 2019 - Tomáš Chvátal diff --git a/python-humanfriendly.spec b/python-humanfriendly.spec index 7877094..8ad3b49 100644 --- a/python-humanfriendly.spec +++ b/python-humanfriendly.spec @@ -1,5 +1,5 @@ # -# spec file for package python-humanfriendly +# spec file for package python # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # @@ -18,16 +18,14 @@ %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" +%define psuffix test %bcond_without test %else +%define psuffix %{nil} %bcond_with test %endif %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%if %{with test} -Name: python-humanfriendly-%{flavor} -%else -Name: python-humanfriendly -%endif +Name: python-humanfriendly%{psuffix} Version: 4.18 Release: 0 Summary: Human friendly input/output for text interfaces using Python @@ -85,23 +83,21 @@ $python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hu } %endif +%if %{with test} +%check +%pytest humanfriendly/tests.py +%endif + %if !%{with test} %post %python_install_alternative humanfriendly %postun %python_uninstall_alternative humanfriendly -%endif - -%if %{with test} -%check -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version} humanfriendly/tests.py -v -%endif %files %{python_files} %license LICENSE.txt %doc README.rst -%if !%{with test} %python_alternative %{_bindir}/humanfriendly %{python_sitelib}/humanfriendly %{python_sitelib}/humanfriendly-%{version}-py*.egg-info