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
|
||||
#
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user