Vinzenz Feenstra has uploaded a new change for review. Change subject: agent: Running PEP8 checks on python files ......................................................................
agent: Running PEP8 checks on python files Change-Id: Ie41f1126dfd124e393ae11e9c4c054c7c23ce7aa Signed-off-by: Vinzenz Feenstra <[email protected]> --- M .gitattributes M Makefile.am M configure.ac 3 files changed, 46 insertions(+), 10 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-guest-agent refs/changes/67/10767/1 diff --git a/.gitattributes b/.gitattributes index 83fdc15..0b4abfc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,10 +1,10 @@ -*.c eol=lf -*.cpp eol=lf -*.py eol=lf -*.h eol=lf -*.rc eol=lf -*.txt eol=lf -*.bat eol=crlf -*.vc*proj* eol=crlf -*.ini eol=crlf -*.sln eol=crlf +*.c text eol=lf +*.cpp text eol=lf +*.py text eol=lf +*.h text eol=lf +*.rc text eol=lf +*.txt text eol=lf +*.bat text eol=crlf +*.vc*proj* text eol=crlf +*.ini text eol=crlf +*.sln text eol=crlf diff --git a/Makefile.am b/Makefile.am index 59d799f..6093668 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,6 +14,33 @@ config.h.in \ Makefile.in +# When fixing a file to conform with pep8 add it to the WL here so it will be +# checkd from now on +PEP8_WHITELIST = \ + ovirt-guest-agent/CredServer.py \ + ovirt-guest-agent/GuestAgentLinux2.py \ + ovirt-guest-agent/GuestAgentWin32.py \ + ovirt-guest-agent/LockActiveSession.py \ + ovirt-guest-agent/OVirtAgentLogic.py \ + ovirt-guest-agent/OVirtGuestService.py \ + ovirt-guest-agent/VirtIoChannel.py \ + ovirt-guest-agent/WinFile.py \ + ovirt-guest-agent/ovirt-guest-agent.py \ + ovirt-guest-agent/version.py + +PEP8_BLACKLIST = ovirt-guest-agent/setup.py + +check-local: + $(PEP8) --exclude="$(PEP8_BLACKLIST)" --filename '*.py,*.py.in' \ + $(PEP8_WHITELIST) + @if test -f .gitignore; then \ + for i in `git ls-files \*.in`; do \ + if ! grep -q -x $${i%%.in} .gitignore; then \ + echo "Missing $${i%%.in} in .gitignore"; exit 1; fi; \ + done; \ + fi; + + install-exec-hook: $(MKDIR_P) $(DESTDIR)/$(pkgdatadir) $(LN_S) $(bindir)/consolehelper $(DESTDIR)/$(pkgdatadir)/ovirt-locksession diff --git a/configure.ac b/configure.ac index 2cb88e6..ffde3af 100644 --- a/configure.ac +++ b/configure.ac @@ -18,6 +18,7 @@ AC_PROG_MKDIR_P AC_PROG_LN_S AM_PATH_PYTHON + dnl --------------------------------------------------------------------------- dnl needed for systemd detection dnl --------------------------------------------------------------------------- @@ -49,6 +50,14 @@ AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) dnl --------------------------------------------------------------------------- +dnl Checking for pep8 +dnl --------------------------------------------------------------------------- +AC_PATH_PROG([PEP8], [pep8]) +if test "x$PEP8" = "x"; then + AC_MSG_WARN([python-pep8 not found]) +fi + +dnl --------------------------------------------------------------------------- dnl - Dependencies dnl --------------------------------------------------------------------------- -- To view, visit http://gerrit.ovirt.org/10767 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie41f1126dfd124e393ae11e9c4c054c7c23ce7aa Gerrit-PatchSet: 1 Gerrit-Project: ovirt-guest-agent Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
