[d-feet/enable-gitlab-ci: 2/6] Detect 'pycodestyle', the new name for 'pep8'
- From: Will Thompson <wjt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [d-feet/enable-gitlab-ci: 2/6] Detect 'pycodestyle', the new name for 'pep8'
- Date: Wed, 19 Sep 2018 10:07:51 +0000 (UTC)
commit 830fb9b9456be66b63fddec908a32a2c13733722
Author: Will Thompson <will willthompson co uk>
Date: Wed Sep 19 10:45:41 2018 +0100
Detect 'pycodestyle', the new name for 'pep8'
The 'pep8' tool has been renamed upstream to 'pycodestyle'. On Debian,
the Python 3 version is packaged and installed as pycodestyle. On
Fedora, it's packaged as python3-pycodestyle and installed as
pycodestyle-3; the Python 2 version is installed as pycodestyle-2 with a
symlink from pycodestyle. Make configure search a variety of such names,
and use the path it finds.
configure.ac | 4 ++--
src/tests/Makefile.am | 7 ++++---
2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 48102ea..0012abc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,8 +27,8 @@ AC_ARG_ENABLE(tests,
enable_tests=$enableval, enable_tests=yes)
if test x$enable_tests = xyes; then
- AC_CHECK_PROG([PEP8], [pep8], [yes])
- test -z "$PEP8" && AC_MSG_ERROR([pep8 binary not found but needed for testsuite. either install it or run
with the argument --disable-tests to not run the testsuite.])
+ AC_CHECK_PROGS([PYCODESTYLE], [pycodestyle-3 pycodestyle pep8], [yes])
+ test -z "$PYCODESTYLE" && AC_MSG_ERROR([pycodestyle binary not found but needed for testsuite. either
install it or run with the argument --disable-tests to not run the testsuite.])
fi
AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "xyes")
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index 14761b2..4e80a55 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -9,8 +9,9 @@ tests.py: tests.py.in
$(AM_V_GEN) sed -e 's|@PYTHON[@]|$(PYTHON)|g' $< > $@
chmod +x $@
-# Default pep8.py --exclude + emacs backup files
-PEP8_EXCLUDES=--exclude='.svn,CVS,.bzr,.hg,.git,__pycache__,.\#*'
+# Default pycodestyle --exclude + emacs backup files
+PYCODESTYLE_EXCLUDES=--exclude='.svn,CVS,.bzr,.hg,.git,__pycache__,.\#*'
check-local:
- pep8 --max-line-length=99 --ignore=E123,E402 $(PEP8_EXCLUDES) $(top_srcdir)/src/
+ $(PYCODESTYLE) --max-line-length=99 --ignore=E123,E402 \
+ $(PYCODESTYLE_EXCLUDES) $(top_srcdir)/src/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]