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
This commit is contained in:
parent
870b788558
commit
aa41020dd6
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-wcwidth
|
# spec file for package python
|
||||||
#
|
#
|
||||||
# Copyright (c) 2020 SUSE LLC
|
# Copyright (c) 2020 SUSE LLC
|
||||||
#
|
#
|
||||||
@ -19,10 +19,12 @@
|
|||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%if "%{flavor}" == "test"
|
%if "%{flavor}" == "test"
|
||||||
%bcond_without test
|
%bcond_without test
|
||||||
|
%define psuffix -%{flavor}
|
||||||
%else
|
%else
|
||||||
%bcond_with test
|
%bcond_with test
|
||||||
|
%define psuffix %{nil}
|
||||||
%endif
|
%endif
|
||||||
Name: python-wcwidth
|
Name: python-wcwidth%{psuffix}
|
||||||
Version: 0.1.9
|
Version: 0.1.9
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Number of Terminal column cells of wide-character codes
|
Summary: Number of Terminal column cells of wide-character codes
|
||||||
@ -59,21 +61,26 @@ release files, which this project aims to track.
|
|||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if ! %{with test}
|
||||||
%python_install
|
%python_install
|
||||||
|
|
||||||
# Remove tests from runtime
|
# Remove tests from runtime
|
||||||
%{python_expand rm -r %{buildroot}%{$python_sitelib}/wcwidth/tests/
|
%{python_expand rm -r %{buildroot}%{$python_sitelib}/wcwidth/tests/
|
||||||
%fdupes %{buildroot}%{$python_sitelib}
|
%fdupes %{buildroot}%{$python_sitelib}
|
||||||
}
|
}
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
%pytest
|
%pytest
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if ! %{with test}
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user