summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/compose_functions2
-rw-r--r--specs/pki-core.spec21
2 files changed, 22 insertions, 1 deletions
diff --git a/scripts/compose_functions b/scripts/compose_functions
index c4ae173e4..e7acec9e1 100644
--- a/scripts/compose_functions
+++ b/scripts/compose_functions
@@ -42,7 +42,7 @@ export PKI_DOGTAG_DIR
PKI_REDHAT_DIR="${PKI_DIR}/redhat"
export PKI_REDHAT_DIR
-PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake scripts/pylint-build-scan.py scripts/dogtag.pylintrc"
+PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake scripts/pylint-build-scan.py scripts/dogtag.pylintrc tox.ini"
export PKI_FILE_LIST
PKI_CMAKE_DIR="cmake"
diff --git a/specs/pki-core.spec b/specs/pki-core.spec
index df2e3aa9e..6aea274e5 100644
--- a/specs/pki-core.spec
+++ b/specs/pki-core.spec
@@ -103,6 +103,8 @@ BuildRequires: resteasy >= 3.0.6-2
%if ! 0%{?rhel}
BuildRequires: pylint
+BuildRequires: python-flake8
+BuildRequires: python3-flake8
%endif
BuildRequires: python-nss
@@ -722,6 +724,25 @@ if [ $? -ne 0 ]; then
echo "pylint failed. RC: $?"
exit 1
fi
+
+python2 ../pylint-build-scan.py rpm --prefix %{buildroot} -- --py3k
+if [ $? -ne 0 ]; then
+ echo "pylint --py3k failed. RC: $?"
+ exit 1
+fi
+
+flake8 --config ../tox.ini %{buildroot}
+if [ $? -ne 0 ]; then
+ echo "flake8 for Python 2 failed. RC: $?"
+ exit 1
+fi
+
+python3-flake8 --config ../tox.ini %{buildroot}
+if [ $? -ne 0 ]; then
+ echo "flake8 for Python 3 failed. RC: $?"
+ exit 1
+fi
+
%endif
%{__rm} -rf %{buildroot}%{_datadir}/pki/server/lib