Accepting request 635822 from devel:languages:python
- add 0001-Skip-test-for-testr-hook-being-installed-when-testr-.patch - update to 4.2.0: * Deprecate 'test' integration * Deprecate 'build\_sphinx' integration * Add Sphinx extension * doc: Add documentation for missing '[pbr]' options * doc: Fix formatting of packagers guide * Switch to stestr OBS-URL: https://build.opensuse.org/request/show/635822 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pbr?expand=0&rev=39
This commit is contained in:
commit
c5b07d2dd9
@ -0,0 +1,43 @@
|
||||
From a4f27ca3972f88e1f494a95ac74fb0c582dd59dd Mon Sep 17 00:00:00 2001
|
||||
From: Dirk Mueller <dirk@dmllr.de>
|
||||
Date: Fri, 14 Sep 2018 23:14:47 +0200
|
||||
Subject: [PATCH] Skip test for testr hook being installed when testr is not
|
||||
available
|
||||
|
||||
pbr only depends on testrepository in the test requirements, so
|
||||
packaging efforts can decide to skip the dependency if they want to.
|
||||
As stestr is going to replace testrepository going forward, it makes
|
||||
sense to make dependencies to testrepository optional.
|
||||
|
||||
Skip the test that requires testrepository in that scenario.
|
||||
|
||||
Change-Id: I28c30411a5a6fdb071ebcc35e65ce1f4f1242498
|
||||
---
|
||||
pbr/tests/test_hooks.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/pbr/tests/test_hooks.py b/pbr/tests/test_hooks.py
|
||||
index 0fcf96c..3f74790 100644
|
||||
--- a/pbr/tests/test_hooks.py
|
||||
+++ b/pbr/tests/test_hooks.py
|
||||
@@ -41,7 +41,9 @@
|
||||
import os
|
||||
|
||||
from testtools import matchers
|
||||
+from testtools import skipUnless
|
||||
|
||||
+from pbr import testr_command
|
||||
from pbr.tests import base
|
||||
from pbr.tests import util
|
||||
|
||||
@@ -66,6 +68,7 @@ class TestHooks(base.BaseTestCase):
|
||||
assert 'test_hook_1\ntest_hook_2' in stdout
|
||||
assert return_code == 0
|
||||
|
||||
+ @skipUnless(testr_command.have_testr, "testrepository not available")
|
||||
def test_custom_commands_known(self):
|
||||
stdout, _, return_code = self.run_setup('--help-commands')
|
||||
self.assertFalse(return_code)
|
||||
--
|
||||
2.18.0
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:754e766b4f4bad3aa68cfd532456298da1aa39375da8748392dbae90860d5f18
|
||||
size 108683
|
3
pbr-4.2.0.tar.gz
Normal file
3
pbr-4.2.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1b8be50d938c9bb75d0eaf7eda111eec1bf6dc88a62a6412e33bf077457e0f45
|
||||
size 107958
|
@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 14 21:18:14 UTC 2018 - dmueller@suse.com
|
||||
|
||||
- add 0001-Skip-test-for-testr-hook-being-installed-when-testr-.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 4 08:47:32 UTC 2018 - dmueller@suse.com
|
||||
|
||||
- update to 4.2.0:
|
||||
* Deprecate 'test' integration
|
||||
* Deprecate 'build\_sphinx' integration
|
||||
* Add Sphinx extension
|
||||
* doc: Add documentation for missing '[pbr]' options
|
||||
* doc: Fix formatting of packagers guide
|
||||
* Switch to stestr
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 27 15:24:52 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
|
@ -28,13 +28,14 @@ Name: python-pbr
|
||||
%else
|
||||
Name: python-pbr-%{flavor}
|
||||
%endif
|
||||
Version: 4.1.1
|
||||
Version: 4.2.0
|
||||
Release: 0
|
||||
Summary: Python Build Reasonableness
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
URL: http://pypi.python.org/pypi/pbr
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pbr/pbr-%{version}.tar.gz
|
||||
Patch0: 0001-Skip-test-for-testr-hook-being-installed-when-testr-.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@ -49,7 +50,7 @@ BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module fixtures >= 3.0.0}
|
||||
BuildRequires: %{python_module mock >= 2.0}
|
||||
BuildRequires: %{python_module six >= 1.9.0}
|
||||
BuildRequires: %{python_module testrepository >= 0.0.18}
|
||||
BuildRequires: %{python_module stestr}
|
||||
BuildRequires: %{python_module testresources >= 2.0.0}
|
||||
BuildRequires: %{python_module testscenarios >= 0.4}
|
||||
BuildRequires: %{python_module testtools >= 2.2.0}
|
||||
@ -69,6 +70,7 @@ information.
|
||||
|
||||
%prep
|
||||
%setup -q -n pbr-%{version}
|
||||
%patch0 -p1
|
||||
# Get rid of ugly build-time deps that require network:
|
||||
sed -i "s/, 'sphinx\.ext\.intersphinx'//" doc/source/conf.py
|
||||
|
||||
@ -90,10 +92,7 @@ chmod -x pbr/tests/testpackage/setup.py
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
%{python_expand rm -rf .testrepository
|
||||
$python %{_bindir}/testr init
|
||||
$python %{_bindir}/testr run --parallel
|
||||
}
|
||||
%python_exec -m stestr.cli run
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
|
Loading…
Reference in New Issue
Block a user