[NEW PATCH] Run pyflakes and exception check before dist (via gerrit-bot)

Federico Simoncelli fsimonce at redhat.com
Tue Aug 16 13:37:41 UTC 2011


New patch submitted by Federico Simoncelli (fsimonce at redhat.com)

You can review this change at: http://gerrit.usersys.redhat.com/813

commit c03a83342e9bf2a6bd7323ff8a5cc33cde9d9197
Author: Federico Simoncelli <fsimonce at redhat.com>
Date:   Thu Aug 11 16:20:05 2011 +0000

    Run pyflakes and exception check before dist
    
    Change-Id: Ib27503e662c729277507f76f9e37c452126368a4

diff --git a/Makefile.am b/Makefile.am
index 6f0267a..f51e595 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,17 +13,10 @@ rpmversion = @PACKAGE_VERSION@
 rpmrelease = @PACKAGE_RELEASE@
 RPMTOP = $(PWD)/rpmtop
 
-test: pyflakes exceptions
-	echo $(rpmrelease) $(rpmversion)
+dist-hook:
+	pyflakes $(SUBDIRS)
 
-.PHONY: exceptions pyflakes srpm rpm
-
-exceptions:
-	python vdsm/storage/storage_exception.py | grep Collision && exit 1 || true
-
-pyflakes:
-	@git ls-files '*.py' | xargs pyflakes \
-	    || (echo "Pyflakes errors or pyflakes not found"; exit 1)
+.PHONY: srpm rpm
 
 srpm: dist
 	$(MKDIR_P) $(RPMTOP)/{RPMS,SRPMS,SOURCES,BUILD}
diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am
index 8345390..dc3c017 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -51,6 +51,9 @@ dist_vdsmstorage_DATA = \
 EXTRA_DIST = \
 	12-vdsm-lvm.rules
 
+dist-hook:
+	python $(srcdir)/storage_exception.py
+
 install-data-local:
 	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/udev/rules.d
 	$(INSTALL_DATA) $(srcdir)/12-vdsm-lvm.rules \




More information about the vdsm-patches mailing list