From aa41020dd6ca31d4af3646444d7cccd7650122dc42117437aeadf8d792310d87 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 6 May 2020 09:37:05 +0000 Subject: [PATCH] Don't share Name between flavors, and don't install for test flavor OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wcwidth?expand=0&rev=20 --- python-wcwidth.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/python-wcwidth.spec b/python-wcwidth.spec index c4dc192..bb3190c 100644 --- a/python-wcwidth.spec +++ b/python-wcwidth.spec @@ -1,5 +1,5 @@ # -# spec file for package python-wcwidth +# spec file for package python # # Copyright (c) 2020 SUSE LLC # @@ -19,10 +19,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %if "%{flavor}" == "test" %bcond_without test +%define psuffix -%{flavor} %else %bcond_with test +%define psuffix %{nil} %endif -Name: python-wcwidth +Name: python-wcwidth%{psuffix} Version: 0.1.9 Release: 0 Summary: Number of Terminal column cells of wide-character codes @@ -59,21 +61,26 @@ release files, which this project aims to track. %python_build %install +%if ! %{with test} %python_install # Remove tests from runtime %{python_expand rm -r %{buildroot}%{$python_sitelib}/wcwidth/tests/ %fdupes %{buildroot}%{$python_sitelib} } +%endif %check %if %{with test} %pytest %endif +%if ! %{with test} + %files %{python_files} %license LICENSE.txt %doc README.rst %{python_sitelib}/* +%endif %changelog