From 7830cda8ef4c4e769d808a5a84f047089ea5e97b2328a06cdac00a2734eeda64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 6 Aug 2018 10:29:46 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pbr?expand=0&rev=88 --- python-pbr.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-pbr.spec b/python-pbr.spec index 7f99bb0..0bb4816 100644 --- a/python-pbr.spec +++ b/python-pbr.spec @@ -56,7 +56,6 @@ BuildRequires: %{python_module virtualenv >= 14.0.6} BuildRequires: %{python_module wheel} BuildRequires: git BuildRequires: gpg2 -Requires: this-is-only-for-build-envs %endif %python_subpackages @@ -80,11 +79,13 @@ chmod -x pbr/tests/testpackage/setup.py %python_build %install +%if !%{with test} %python_install %python_expand rm -rf %{buildroot}%{$python_sitelib}/pbr/tests %python_clone -a %{buildroot}%{_bindir}/pbr %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %if %{with test} %check @@ -94,17 +95,21 @@ $python %{_bindir}/testr run --parallel } %endif +%if !%{with test} %post %python_install_alternative pbr %postun %python_uninstall_alternative pbr +%endif %files %{python_files} %license LICENSE +%if !%{with test} %doc AUTHORS ChangeLog CONTRIBUTING.rst README.rst %python_alternative %{_bindir}/pbr %{python_sitelib}/pbr %{python_sitelib}/pbr-%{version}-py%{python_version}.egg-info +%endif %changelog