15
0

Accepting request 689802 from devel:languages:python

- Simplify the multibuild conditioning and name creation

OBS-URL: https://build.opensuse.org/request/show/689802
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-humanfriendly?expand=0&rev=10
This commit is contained in:
2019-03-29 19:43:35 +00:00
committed by Git OBS Bridge
2 changed files with 14 additions and 13 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Mar 29 10:46:17 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Simplify the multibuild conditioning and name creation
-------------------------------------------------------------------
Tue Mar 12 16:03:38 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@@ -1,5 +1,5 @@
#
# spec file for package python-humanfriendly
# spec file for package python
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
@@ -18,16 +18,14 @@
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%if %{with test}
Name: python-humanfriendly-%{flavor}
%else
Name: python-humanfriendly
%endif
Name: python-humanfriendly%{psuffix}
Version: 4.18
Release: 0
Summary: Human friendly input/output for text interfaces using Python
@@ -85,23 +83,21 @@ $python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hu
}
%endif
%if %{with test}
%check
%pytest humanfriendly/tests.py
%endif
%if !%{with test}
%post
%python_install_alternative humanfriendly
%postun
%python_uninstall_alternative humanfriendly
%endif
%if %{with test}
%check
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version} humanfriendly/tests.py -v
%endif
%files %{python_files}
%license LICENSE.txt
%doc README.rst
%if !%{with test}
%python_alternative %{_bindir}/humanfriendly
%{python_sitelib}/humanfriendly
%{python_sitelib}/humanfriendly-%{version}-py*.egg-info