Bug 1273634 - Add flake8 dependencies to the lint image, r=dustin
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Sat, 28 May 2016 21:47:33 -0400
changeset 341206 bd123ca39e1fb1bdd237be4d6f7ece716b02d3d2
parent 341205 61988719cd2a67eb7b1ddf783b0e6354ab15aaff
child 341207 e4ae9ac1a071e07e369ef56ac30695a238f84b20
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1273634
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1273634 - Add flake8 dependencies to the lint image, r=dustin This adds flake8 dependencies. Note that ubuntu 16.04 repos include pip > 8.0 which has peep merged into it, so there's no need to install peep separately. I also ran into a locale issue which was causing a UnicodeDecodeError anytime python tried to print a unicode character. The "locale-gen/dpkg-reconfigure locales" fix the problem. MozReview-Commit-ID: DQhYV6Emklw
testing/docker/lint/system-setup.sh
--- a/testing/docker/lint/system-setup.sh
+++ b/testing/docker/lint/system-setup.sh
@@ -8,21 +8,28 @@ test `whoami` == 'root'
 
 mkdir -p /setup
 cd /setup
 
 apt_packages=()
 apt_packages+=('curl')
 apt_packages+=('mercurial')
 apt_packages+=('python')
+apt_packages+=('python-pip')
+apt_packages+=('sudo')
 apt_packages+=('xz-utils')
 
 apt-get update
 apt-get install -y ${apt_packages[@]}
 
+# Without this we get spurious "LC_ALL: cannot change locale (en_US.UTF-8)" errors,
+# and python scripts raise UnicodeEncodeError when trying to print unicode characters.
+locale-gen en_US.UTF-8
+dpkg-reconfigure locales
+
 tooltool_fetch() {
     cat >manifest.tt
     /build/tooltool.py fetch
     rm manifest.tt
 }
 
 
 ###
@@ -56,10 +63,24 @@ tooltool_fetch <<'EOF'
 "digest": "a781a96e596f6403eca6ec2300adb9c1a396659393e16993c66f98a658050e557bc681d521f70b50c1162aa4b435274e0098ffcbd37cbe969c0e4f69be19a1e0",
 "algorithm": "sha512",
 "filename": "taskcluster-vcs-v2.3.12.tar.gz"
 }
 ]
 EOF
 npm install -g taskcluster-vcs-v2.3.12.tar.gz
 
+
+###
+# Flake8 Setup
+###
+
+cat >requirements.txt <<'EOF'
+mccabe==0.4.0   --hash=sha256:cbc2938f6c01061bc6d21d0c838c2489664755cb18676f0734d7617f4577d09e
+pep8==1.7.0     --hash=sha256:4fc2e478addcf17016657dff30b2d8d611e8341fac19ccf2768802f6635d7b8a
+pyflakes==1.2.3 --hash=sha256:e87bac26c62ea5b45067cc89e4a12f56e1483f1f2cda17e7c9b375b9fd2f40da
+flake8==2.5.4   --hash=sha256:fb5a67af4024622287a76abf6b7fe4fb3cfacf765a790976ce64f52c44c88e4a
+EOF
+
+pip install --require-hashes -r requirements.txt
+
 cd /
 rm -rf /setup