File tree Expand file tree Collapse file tree 3 files changed +29
-11
lines changed Expand file tree Collapse file tree 3 files changed +29
-11
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,19 @@ RUN echo 2
3232
3333 RUN apt-get install -y curl
3434
35+ <% if preload? && distro =~ /ubuntu1204/ %>
36+
37+ # ubuntu1204 comes with python 2.7.3.
38+ # Install a more recent one from deadsnakes ppa so that pip works.
39+ RUN apt-get install -y python-software-properties
40+ # https://github.com/deadsnakes/issues/issues/53
41+ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5BB92C09DB82666C
42+ RUN add-apt-repository ppa:fkrull/deadsnakes-python2.7
43+ RUN apt-get update
44+ RUN apt-get install -y python2.7-dev
45+
46+ <% end %>
47+
3548<% end %>
3649
3750<% if ruby_head? %>
@@ -107,6 +120,17 @@ RUN echo 2
107120 ENV USE_OPT_TOOLCHAIN=1
108121
109122 <% end %>
123+
124+ <% if distro =~ /ubuntu1204/ %>
125+
126+ # Ubuntu 12.04 ships pip 1.0 which is ancient and does not work.
127+ # https://pip.pypa.io/en/stable/installing/
128+ RUN curl --retry 3 -fLo get-pip.py https://bootstrap.pypa.io/get-pip.py
129+ RUN python get-pip.py
130+
131+ <% end %>
132+
133+ RUN pip --version
110134
111135<% end %>
112136
@@ -124,9 +148,7 @@ WORKDIR /app
124148
125149COPY . .
126150
127- ENV MONGO_ORCHESTRATION_HOME=/tmpfs
128- ENV PROJECT_DIRECTORY=/app
151+ ENV MONGO_ORCHESTRATION_HOME=/tmpfs \
152+ PROJECT_DIRECTORY=/app
129153
130- <% @env.each do |k, v| %>
131- ENV <%= k %> ="<%= v %> "
132- <% end %>
154+ ENV <%= @env.map { |k, v| %Q`#{k}="#{v}"` }.join(" \\\n ") %>
Original file line number Diff line number Diff line change @@ -300,10 +300,6 @@ install_mlaunch_pip() {
300300 python -V || true
301301 python3 -V || true
302302 pythonpath=" $MONGO_ORCHESTRATION_HOME " /python
303- # The scripts in a python installation have shebangs pointing to the
304- # prefix, which doesn't work for us because we unpack toolchain to a
305- # different directory than prefix used for building. Work around this by
306- # explicitly running pip3 with python.
307303 pip install -t " $pythonpath " ' mtools-legacy[mlaunch]'
308304 export PATH=" $pythonpath /bin" :$PATH
309305 export PYTHONPATH=" $pythonpath "
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ if test "$SSL" = ssl; then
7878" tlsCertificateKeyFile=spec/support/certificates/$client_pem "
7979fi
8080
81- mlaunch --dir " $dbdir " --binarypath " $BINDIR " $args
81+ python -m mtools.mlaunch. mlaunch --dir " $dbdir " --binarypath " $BINDIR " $args
8282
8383install_deps
8484
@@ -164,6 +164,6 @@ echo ${test_status}
164164
165165kill_jruby
166166
167- mlaunch stop --dir " $dbdir "
167+ python -m mtools.mlaunch. mlaunch stop --dir " $dbdir "
168168
169169exit ${test_status}
You can’t perform that action at this time.
0 commit comments