You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by aw...@apache.org on 2018/12/10 06:59:56 UTC
[4/5] yetus git commit: YETUS-716. Upgrade pylint to support both
python2 and python3
YETUS-716. Upgrade pylint to support both python2 and python3
Signed-off-by: Allen Wittenauer <aw...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/54b3c846
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/54b3c846
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/54b3c846
Branch: refs/heads/master
Commit: 54b3c846d28806ecba893723b94161c06118b6c6
Parents: dcc2e5b
Author: Allen Wittenauer <aw...@apache.org>
Authored: Wed Nov 14 10:37:48 2018 -0800
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Sun Dec 9 22:43:29 2018 -0800
----------------------------------------------------------------------
.../src/main/shell/test-patch-docker/Dockerfile | 24 +++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/yetus/blob/54b3c846/precommit/src/main/shell/test-patch-docker/Dockerfile
----------------------------------------------------------------------
diff --git a/precommit/src/main/shell/test-patch-docker/Dockerfile b/precommit/src/main/shell/test-patch-docker/Dockerfile
index 161c42d..81f2458 100644
--- a/precommit/src/main/shell/test-patch-docker/Dockerfile
+++ b/precommit/src/main/shell/test-patch-docker/Dockerfile
@@ -126,7 +126,22 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y perl libp
&& rm -rf /var/lib/apt/lists/*
######
-# Install python and pylint
+# Install python3 and pylint3
+######
+RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
+ python3 \
+ python3-pip \
+ python3-pkg-resources \
+ python3-setuptools \
+ python3-wheel \
+ python3-dev \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/*
+RUN pip3 install -v pylint==2.1.1
+RUN mv /usr/local/bin/pylint /usr/local/bin/pylint3
+
+######
+# Install python2 and pylint2
######
RUN apt-get -q update && apt-get -q install --no-install-recommends -y python \
python2.7 \
@@ -134,9 +149,16 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y python \
python-pkg-resources \
python-setuptools \
python-wheel \
+ python-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN pip2 install -v pylint==1.9.2 python-dateutil==2.7.3
+RUN mv /usr/local/bin/pylint /usr/local/bin/pylint2
+
+#####
+# backward compatibility
+#####
+RUN ln -s /usr/local/bin/pylint2 /usr/local/bin/pylint
####
# Install ruby, rubocop, and ruby-lint