[packages/python-mock] - pbr and six buildrequired only for tests or doc

qboosh qboosh at pld-linux.org
Fri Jul 13 19:13:28 CEST 2018


commit 32e3a44095f4c89f52d61e392a8854afa7b5d1d0
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Jul 13 19:15:17 2018 +0200

    - pbr and six buildrequired only for tests or doc

 python-mock.spec | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/python-mock.spec b/python-mock.spec
index 021598a..c025d8d 100644
--- a/python-mock.spec
+++ b/python-mock.spec
@@ -21,19 +21,25 @@ BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.710
 %if %{with python2}
 BuildRequires:	python-modules >= 1:2.6
-BuildRequires:	python-pbr >= 1.3
 BuildRequires:	python-setuptools >= 17.1
+%if %{with tests}
+BuildRequires:	python-pbr >= 1.3
 BuildRequires:	python-six >= 1.7
-%{?with_tests:BuildRequires:	python-unittest2 >= 1.1.0}
+BuildRequires:	python-unittest2 >= 1.1.0
+%endif
 %endif
 %if %{with python3}
 BuildRequires:	python3-modules >= 1:3.2
-BuildRequires:	python3-pbr >= 1.3
 BuildRequires:	python3-setuptools >= 17.1
+%if %{with doc} || %{with tests}
+BuildRequires:	python3-pbr >= 1.3
 BuildRequires:	python3-six >= 1.7
+%endif
 %{?with_tests:BuildRequires:	python3-unittest2 >= 1.1.0}
 %endif
-%{?with_doc:BuildRequires:	sphinx-pdg}
+%if %{with doc}
+BuildRequires:	sphinx-pdg-3
+%endif
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -125,7 +131,7 @@ chmod a-w AUTHORS ChangeLog
 %endif
 
 %if %{with doc}
-PYTHONPATH=. sphinx-build -b html docs html
+PYTHONPATH=. sphinx-build-3 -b html docs html
 %{__rm} -r html/{_sources,.doctrees,.buildinfo}
 %endif
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-mock.git/commitdiff/32e3a44095f4c89f52d61e392a8854afa7b5d1d0



More information about the pld-cvs-commit mailing list