forked from pool/python-humanfriendly
- Simplify the multibuild conditioning and name creation
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-humanfriendly?expand=0&rev=21
This commit is contained in:
committed by
Git OBS Bridge
parent
1fe84d5bb8
commit
2514e71fe7
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user