Remove the source (slimming us down by about 100MB) and skip the tests entirely (since they've been so flaky for us)

This commit is contained in:
Tianon Gravi 2014-11-10 11:05:40 -07:00
parent 8dfe392dff
commit ce7da0b874
3 changed files with 21 additions and 26 deletions

View File

@ -5,24 +5,21 @@ RUN apt-get update && apt-get install -y curl procps
# remove several traces of debian python
RUN apt-get purge -y python python-minimal python2.7-minimal
RUN mkdir /usr/src/python
WORKDIR /usr/src/python
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
ENV PYTHON_VERSION 2.7.8
RUN curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
| tar -xJ --strip-components=1
# skip "test_file2k" thanks to "AssertionError: IOError not raised"
# skip "test_mhlib" because it fails on the hub in "test_listfolders" with "AssertionError: Lists differ: [] != ['deep', 'deep/f1', 'deep/f2',..."
RUN ./configure \
RUN mkdir -p /usr/src/python \
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
| tar -xJC /usr/src/python --strip-components=1 \
&& cd /usr/src/python \
&& ./configure \
&& make -j$(nproc) \
&& make EXTRATESTOPTS='--exclude test_file2k test_mhlib' test \
&& make install \
&& make clean
&& cd / \
&& rm -rf /usr/src/python
# install "pip" and "virtualenv", since the vast majority of users of this image will want it
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python2

View File

@ -5,21 +5,21 @@ RUN apt-get update && apt-get install -y curl procps
# remove several traces of debian python
RUN apt-get purge -y python python-minimal python2.7-minimal
RUN mkdir /usr/src/python
WORKDIR /usr/src/python
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
ENV PYTHON_VERSION 3.3.6
RUN curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
| tar -xJ --strip-components=1
RUN ./configure \
RUN mkdir -p /usr/src/python \
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
| tar -xJC /usr/src/python --strip-components=1 \
&& cd /usr/src/python \
&& ./configure \
&& make -j$(nproc) \
&& make install \
&& make clean
&& cd / \
&& rm -rf /usr/src/python
# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \

View File

@ -5,23 +5,21 @@ RUN apt-get update && apt-get install -y curl procps
# remove several traces of debian python
RUN apt-get purge -y python python-minimal python2.7-minimal
RUN mkdir /usr/src/python
WORKDIR /usr/src/python
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
ENV PYTHON_VERSION 3.4.2
RUN curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
| tar -xJ --strip-components=1
# skip "test_shutil" thanks to "PermissionError: [Errno 1] Operation not permitted" trying to set xattrs
RUN ./configure \
RUN mkdir -p /usr/src/python \
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
| tar -xJC /usr/src/python --strip-components=1 \
&& cd /usr/src/python \
&& ./configure \
&& make -j$(nproc) \
&& make -j$(nproc) EXTRATESTOPTS='--exclude test_shutil' test \
&& make install \
&& make clean
&& cd / \
&& rm -rf /usr/src/python
# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \