Fix python setups for rbe-{debian8, debian9, ubuntu16_04} (#46)
- Fix PATH: py2's pip/easy_install won't be shadowed by py3
- Remove some python debs from rbe-{debian8,ubuntu16_04}
+ All python3 related tools are installed from tarball
+ python-pip is conflicted with easy_install version of pip, which
makes it hard to upgrade pip itself with easy_install
diff --git a/container/experimental/rbe-debian8/BUILD b/container/experimental/rbe-debian8/BUILD
index a80ea69..59d0551 100644
--- a/container/experimental/rbe-debian8/BUILD
+++ b/container/experimental/rbe-debian8/BUILD
@@ -78,7 +78,7 @@
name = "go-ltl",
env = {
"GOPATH": "/go",
- "PATH": "/usr/local/go/bin:$PATH",
+ "PATH": "$PATH:/usr/local/go/bin",
},
tags = ["manual"],
tars = ["//third_party/golang:tar"],
@@ -100,7 +100,7 @@
name = "python-ltl",
debs = python_layer_packages(),
env = {
- "PATH": "/opt/python3.6/bin:$PATH",
+ "PATH": "$PATH:/opt/python3.6/bin",
},
symlinks = {
"/usr/bin/python": "/usr/bin/python2.7",
diff --git a/container/experimental/rbe-debian9/BUILD b/container/experimental/rbe-debian9/BUILD
index 479f9ec..41d9eb1 100644
--- a/container/experimental/rbe-debian9/BUILD
+++ b/container/experimental/rbe-debian9/BUILD
@@ -40,7 +40,7 @@
env = {
# PATH envvar is a special case, and currently only the one in the
# topmost layer is set. So that we override it here to include all.
- "PATH": "/opt/python3.6/bin:/usr/local/go/bin:$PATH",
+ "PATH": "$PATH:/usr/local/go/bin",
},
language_layers = [
"base-ltl",
diff --git a/container/experimental/rbe-ubuntu16_04/BUILD b/container/experimental/rbe-ubuntu16_04/BUILD
index dc22a2b..d37e742 100644
--- a/container/experimental/rbe-ubuntu16_04/BUILD
+++ b/container/experimental/rbe-ubuntu16_04/BUILD
@@ -40,7 +40,7 @@
env = {
# PATH envvar is a special case, and currently only the one in the
# topmost layer is set. So that we override it here to include all.
- "PATH": "/opt/python3.6/bin:/usr/local/go/bin:$PATH",
+ "PATH": "$PATH:/opt/python3.6/bin:/usr/local/go/bin",
},
language_layers = [
"base-ltl",
@@ -122,15 +122,12 @@
packages = [
"python-dev",
"python-numpy",
- "python-pip",
"python-setuptools",
"python3-dev",
- "python3-numpy",
- "python3-pip",
- "python3-setuptools",
],
symlinks = {
"/usr/bin/python": "/usr/bin/python2.7",
+ "/usr/bin/python3": "/opt/python3.6/bin/python3.6",
"/opt/python3.6/bin/python3": "/opt/python3.6/bin/python3.6",
"/opt/python3.6/bin/pip3": "/opt/python3.6/bin/pip3.6",
"/opt/python3.6/bin/easy_install3": "/opt/python3.6/bin/easy_install-3.6",
diff --git a/container/rbe-debian8/BUILD b/container/rbe-debian8/BUILD
index abc2b07..b05462d 100644
--- a/container/rbe-debian8/BUILD
+++ b/container/rbe-debian8/BUILD
@@ -40,7 +40,7 @@
env = {
# PATH envvar is a special case, and currently only the one in the
# topmost layer is set. So that we override it here to include all.
- "PATH": "/opt/python3.6/bin:/usr/local/go/bin:$PATH",
+ "PATH": "$PATH:/opt/python3.6/bin:/usr/local/go/bin",
},
language_layers = [
"base-ltl",
@@ -125,15 +125,12 @@
packages = [
"python-dev",
"python-numpy",
- "python-pip",
"python-setuptools",
"python3-dev",
- "python3-numpy",
- "python3-pip",
- "python3-setuptools",
],
symlinks = {
"/usr/bin/python": "/usr/bin/python2.7",
+ "/usr/bin/python3": "/opt/python3.6/bin/python3.6",
"/opt/python3.6/bin/python3": "/opt/python3.6/bin/python3.6",
"/opt/python3.6/bin/pip3": "/opt/python3.6/bin/pip3.6",
"/opt/python3.6/bin/easy_install3": "/opt/python3.6/bin/easy_install-3.6",
diff --git a/container/test/rbe-debian8.yaml b/container/test/rbe-debian8.yaml
index e5abeab..d4425e7 100644
--- a/container/test/rbe-debian8.yaml
+++ b/container/test/rbe-debian8.yaml
@@ -17,7 +17,7 @@
commandTests:
- name: 'path-envvar'
command: ['sh', '-c', 'echo $PATH']
- expectedOutput: ['/opt/python3.6/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin']
+ expectedOutput: ['/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/python3.6/bin:/usr/local/go/bin']
- name: 'cc-envvar'
command: ['sh', '-c', 'echo $CC']
expectedOutput: ['/usr/local/bin/clang']
diff --git a/container/test/rbe-debian9.yaml b/container/test/rbe-debian9.yaml
index a259fab..33d7c52 100644
--- a/container/test/rbe-debian9.yaml
+++ b/container/test/rbe-debian9.yaml
@@ -17,7 +17,7 @@
commandTests:
- name: 'path-envvar'
command: ['sh', '-c', 'echo $PATH']
- expectedOutput: ['/opt/python3.6/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin']
+ expectedOutput: ['/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin']
- name: 'cc-envvar'
command: ['sh', '-c', 'echo $CC']
expectedOutput: ['/usr/local/bin/clang']
diff --git a/container/test/rbe-ubuntu16_04.yaml b/container/test/rbe-ubuntu16_04.yaml
index b958520..0265c1f 100644
--- a/container/test/rbe-ubuntu16_04.yaml
+++ b/container/test/rbe-ubuntu16_04.yaml
@@ -17,7 +17,7 @@
commandTests:
- name: 'path-envvar'
command: ['sh', '-c', 'echo $PATH']
- expectedOutput: ['/opt/python3.6/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin']
+ expectedOutput: ['/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/python3.6/bin:/usr/local/go/bin']
- name: 'cc-envvar'
command: ['sh', '-c', 'echo $CC']
expectedOutput: ['/usr/local/bin/clang']