[packages/flake8] enable tests (tests bcond did not exist), update deps for tests

glen glen at pld-linux.org
Thu Nov 27 22:36:17 CET 2014


commit a24e9a344e1ef58a54a492ef1c4cfacf8f974dec
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Nov 27 23:36:11 2014 +0200

    enable tests (tests bcond did not exist), update deps for tests

 flake8.spec | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/flake8.spec b/flake8.spec
index 5f5876f..f483208 100644
--- a/flake8.spec
+++ b/flake8.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without	tests	# do not perform "make test"
+
 Summary:	The modular source code checker: pep8, pyflakes and co
 Name:		flake8
 Version:	2.2.5
@@ -9,6 +13,11 @@ Source0:	https://pypi.python.org/packages/source/f/flake8/%{name}-%{version}.tar
 URL:		https://pypi.python.org/pypi/flake8
 BuildRequires:	python3-modules
 BuildRequires:	rpm-pythonprov
+%if %{with tests}
+BuildRequires:	python3-mccabe >= 0.2.1
+BuildRequires:	python3-pep8 >= 1.5.7
+BuildRequires:	python3-pyflakes >= 0.8.1
+%endif
 Requires:	python3-modules
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -23,16 +32,14 @@ The modular source code checker. It is a wrapper around these tools:
 %setup -q
 
 %build
-%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
+%{__python3} setup.py build %{?with_tests:test}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-%{__python3} setup.py \
-		build --build-base build-3 \
-		install --skip-build \
-		--optimize=2 \
-		--root=$RPM_BUILD_ROOT
+%{__python3} setup.py install \
+	--skip-build \
+	--optimize=2 \
+	--root=$RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/flake8.git/commitdiff/a24e9a344e1ef58a54a492ef1c4cfacf8f974dec



More information about the pld-cvs-commit mailing list