From e60bf3ecbe5f6aaec49d6abbe85e433b46b6a46d4d36b4bbe450a6e9b429e9d7 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 4 Jul 2013 16:06:10 +0000 Subject: [PATCH] Accepting request 182133 from Cloud:OpenStack:Factory - Introduce a build conditional for running tests to break build cycle with python-oslo.config OBS-URL: https://build.opensuse.org/request/show/182133 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pbr?expand=0&rev=2 --- python-pbr.changes | 6 ++++++ python-pbr.spec | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/python-pbr.changes b/python-pbr.changes index 57ef182..6b73f4f 100644 --- a/python-pbr.changes +++ b/python-pbr.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 4 07:29:43 UTC 2013 - speilicke@suse.com + +- Introduce a build conditional for running tests to break build cycle + with python-oslo.config + ------------------------------------------------------------------- Tue Jul 2 16:06:42 UTC 2013 - dmueller@suse.com diff --git a/python-pbr.spec b/python-pbr.spec index e7491e5..9972dc8 100644 --- a/python-pbr.spec +++ b/python-pbr.spec @@ -16,6 +16,10 @@ # +# A build cycle exists between python-extras and python-testtools. Thus, only +# enable testing with a build conditional (off by default): +%bcond_with tests + Name: python-pbr Version: 0.5.17 Release: 0 @@ -29,6 +33,7 @@ BuildRequires: python-devel # Documentation requirements: BuildRequires: python-Sphinx # Test requirements: +%if %{with tests} BuildRequires: python-coverage >= 3.6 %if 0%{?suse_version} <= 1110 BuildRequires: python-discover @@ -44,6 +49,7 @@ BuildRequires: python-testrepository >= 0.0.13 BuildRequires: python-testresources BuildRequires: python-testscenarios BuildRequires: python-testtools >= 0.9.27 +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} @@ -71,8 +77,10 @@ python setup.py build_sphinx %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%if %{with tests} %check python setup.py testr +%endif %files %defattr(-,root,root,-)