Change in vdsm[master]: build: Add dependencies for generated .py files

nsoffer at redhat.com nsoffer at redhat.com
Fri Dec 11 01:35:31 UTC 2015


Nir Soffer has uploaded a new change for review.

Change subject: build: Add dependencies for generated .py files
......................................................................

build: Add dependencies for generated .py files

In the past we checked .py.in files with pep8 and pyflakes. Recently we
removed this wrong check, and we are checking only .py files.

This change required running "make; make check", to have .py files
generated before running make check.

This patch add dependencies so "make check" will generated the files it
wants to check.

Searching for .py.in file is not needed now and was removed.

Change-Id: I57eeba76a5e07a1edeae6869e103547347e874cf
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M Makefile.am
M automation/check-patch.sh
2 files changed, 6 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/50299/1

diff --git a/Makefile.am b/Makefile.am
index 548436a..d6b8eb3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -92,8 +92,8 @@
 	fi;
 
 .PHONY: abs_imports
-abs_imports:
-	@for f in `git ls-files $(ABS_IMPORT_WHITELIST) |grep '.py$$\|.py.in$$'`; do\
+abs_imports: all
+	@for f in `git ls-files $(ABS_IMPORT_WHITELIST) |grep '.py$$'`; do\
 	  if ! grep -q '^from __future__ import absolute_import$$' "$$f"; then \
 	    echo "Missing absolute_import in $$f"; exit 1; fi; \
 	done;
@@ -102,7 +102,7 @@
 	'lv' from line .*"
 
 .PHONY: pyflakes
-pyflakes:
+pyflakes: all
 	python -c 'import pyflakes; print("pyflakes-%s" % pyflakes.__version__)'
 	( find . -path './.git' -prune -type f -o \
 		-name '*.py' && \
@@ -111,7 +111,7 @@
 		while read LINE; do echo "$$LINE"; false; done
 
 .PHONY: pep8
-pep8:
+pep8: all
 	$(PEP8) --version
 	for x in $(PEP8_BLACKLIST); do \
 	    exclude="$${exclude},$${x}" ; \
@@ -120,11 +120,11 @@
 	$(WHITELIST)
 
 .PHONY: python3
-python3:
+python3: all
 	if [ -x "$(PYTHON3)" ]; then \
 	    PYTHONDONTWRITEBYTECODE=1 $(PYTHON3) -m compileall \
 		$(WHITELIST) \
-		`find . -name '*.py' -o -name '*.py.in'`; \
+		`find . -name '*.py'`; \
 	else \
 	    echo "Warning: skipping python3 syntax check"; \
 	fi
diff --git a/automation/check-patch.sh b/automation/check-patch.sh
index 2377d35..259481e 100755
--- a/automation/check-patch.sh
+++ b/automation/check-patch.sh
@@ -6,10 +6,6 @@
 
 ./autogen.sh --system --enable-hooks
 
-# 'make check' runs pep8 and pyflakes for all .py files. To generate
-# templates (py.in files) we run 'make' before.
-make all
-
 make check NOSE_WITH_COVERAGE=1 NOSE_COVER_PACKAGE="$PWD/vdsm,$PWD/lib"
 
 ./automation/build-artifacts.sh


-- 
To view, visit https://gerrit.ovirt.org/50299
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57eeba76a5e07a1edeae6869e103547347e874cf
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list