Accepting request 800655 from devel:languages:python

- Convert to multibuild to break a self-requires loop.

OBS-URL: https://build.opensuse.org/request/show/800655
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wcwidth?expand=0&rev=8
This commit is contained in:
Dominique Leuenberger 2020-05-11 11:25:52 +00:00 committed by Git OBS Bridge
commit 9ad218695d
3 changed files with 27 additions and 2 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed May 6 02:25:29 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
- Convert to multibuild to break a self-requires loop.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Mar 25 14:31:41 UTC 2020 - pgajdos@suse.com Wed Mar 25 14:31:41 UTC 2020 - pgajdos@suse.com

View File

@ -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
# #
@ -17,7 +17,15 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-wcwidth %global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%bcond_without test
%define psuffix -%{flavor}
%else
%bcond_with test
%define psuffix %{nil}
%endif
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
@ -25,7 +33,9 @@ License: MIT
Group: Development/Languages/Python Group: Development/Languages/Python
URL: https://github.com/jquast/wcwidth URL: https://github.com/jquast/wcwidth
Source: https://files.pythonhosted.org/packages/source/w/wcwidth/wcwidth-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/w/wcwidth/wcwidth-%{version}.tar.gz
%if %{with test}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
%endif
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
@ -52,19 +62,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}
%pytest %pytest
%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