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