Fixes https://github.com/docker-library/python/pull/102 (tests folder removal)
This commit is contained in:
parent
8179a07e8a
commit
3232863ad5
|
@ -33,10 +33,12 @@ RUN set -ex \
|
||||||
&& ldconfig \
|
&& ldconfig \
|
||||||
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \
|
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \
|
||||||
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& rm -rf /usr/src/python ~/.cache
|
&& rm -rf /usr/src/python ~/.cache
|
||||||
|
|
||||||
# install "virtualenv", since the vast majority of users of this image will want it
|
# install "virtualenv", since the vast majority of users of this image will want it
|
||||||
|
|
|
@ -43,10 +43,12 @@ RUN set -ex \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \
|
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \
|
||||||
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& runDeps="$( \
|
&& runDeps="$( \
|
||||||
scanelf --needed --nobanner --recursive /usr/local \
|
scanelf --needed --nobanner --recursive /usr/local \
|
||||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||||
|
|
|
@ -53,10 +53,12 @@ RUN set -ex \
|
||||||
&& ldconfig \
|
&& ldconfig \
|
||||||
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \
|
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \
|
||||||
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& apt-get purge -y --auto-remove $buildDeps \
|
&& apt-get purge -y --auto-remove $buildDeps \
|
||||||
&& rm -rf /usr/src/python ~/.cache
|
&& rm -rf /usr/src/python ~/.cache
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,12 @@ RUN set -ex \
|
||||||
&& ldconfig \
|
&& ldconfig \
|
||||||
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \
|
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \
|
||||||
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& rm -rf /usr/src/python ~/.cache
|
&& rm -rf /usr/src/python ~/.cache
|
||||||
|
|
||||||
# install "virtualenv", since the vast majority of users of this image will want it
|
# install "virtualenv", since the vast majority of users of this image will want it
|
||||||
|
|
|
@ -33,10 +33,12 @@ RUN set -ex \
|
||||||
&& ldconfig \
|
&& ldconfig \
|
||||||
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
|
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
|
||||||
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& rm -rf /usr/src/python ~/.cache
|
&& rm -rf /usr/src/python ~/.cache
|
||||||
|
|
||||||
# make some useful symlinks that are expected to exist
|
# make some useful symlinks that are expected to exist
|
||||||
|
|
|
@ -44,10 +44,12 @@ RUN set -ex \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
|
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
|
||||||
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& runDeps="$( \
|
&& runDeps="$( \
|
||||||
scanelf --needed --nobanner --recursive /usr/local \
|
scanelf --needed --nobanner --recursive /usr/local \
|
||||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||||
|
|
|
@ -54,10 +54,12 @@ RUN set -ex \
|
||||||
&& ldconfig \
|
&& ldconfig \
|
||||||
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
|
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
|
||||||
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& apt-get purge -y --auto-remove $buildDeps \
|
&& apt-get purge -y --auto-remove $buildDeps \
|
||||||
&& rm -rf /usr/src/python ~/.cache
|
&& rm -rf /usr/src/python ~/.cache
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,12 @@ RUN set -ex \
|
||||||
&& ldconfig \
|
&& ldconfig \
|
||||||
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
|
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
|
||||||
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& rm -rf /usr/src/python ~/.cache
|
&& rm -rf /usr/src/python ~/.cache
|
||||||
|
|
||||||
# make some useful symlinks that are expected to exist
|
# make some useful symlinks that are expected to exist
|
||||||
|
|
|
@ -32,10 +32,12 @@ RUN set -ex \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& ldconfig \
|
&& ldconfig \
|
||||||
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& rm -rf /usr/src/python ~/.cache
|
&& rm -rf /usr/src/python ~/.cache
|
||||||
|
|
||||||
# make some useful symlinks that are expected to exist
|
# make some useful symlinks that are expected to exist
|
||||||
|
|
|
@ -44,10 +44,12 @@ RUN set -ex \
|
||||||
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& runDeps="$( \
|
&& runDeps="$( \
|
||||||
scanelf --needed --nobanner --recursive /usr/local \
|
scanelf --needed --nobanner --recursive /usr/local \
|
||||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||||
|
|
|
@ -53,10 +53,12 @@ RUN set -ex \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& ldconfig \
|
&& ldconfig \
|
||||||
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& apt-get purge -y --auto-remove $buildDeps \
|
&& apt-get purge -y --auto-remove $buildDeps \
|
||||||
&& rm -rf /usr/src/python ~/.cache
|
&& rm -rf /usr/src/python ~/.cache
|
||||||
|
|
||||||
|
|
|
@ -32,10 +32,12 @@ RUN set -ex \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& ldconfig \
|
&& ldconfig \
|
||||||
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& rm -rf /usr/src/python ~/.cache
|
&& rm -rf /usr/src/python ~/.cache
|
||||||
|
|
||||||
# make some useful symlinks that are expected to exist
|
# make some useful symlinks that are expected to exist
|
||||||
|
|
|
@ -32,10 +32,12 @@ RUN set -ex \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& ldconfig \
|
&& ldconfig \
|
||||||
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& rm -rf /usr/src/python ~/.cache
|
&& rm -rf /usr/src/python ~/.cache
|
||||||
|
|
||||||
# make some useful symlinks that are expected to exist
|
# make some useful symlinks that are expected to exist
|
||||||
|
|
|
@ -44,10 +44,12 @@ RUN set -ex \
|
||||||
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& runDeps="$( \
|
&& runDeps="$( \
|
||||||
scanelf --needed --nobanner --recursive /usr/local \
|
scanelf --needed --nobanner --recursive /usr/local \
|
||||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||||
|
|
|
@ -53,10 +53,12 @@ RUN set -ex \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& ldconfig \
|
&& ldconfig \
|
||||||
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
|
||||||
&& find /usr/local \
|
&& find /usr/local -depth \
|
||||||
\( -type d -a -name test -o -name tests \) \
|
\( \
|
||||||
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
\( -type d -a -name test -o -name tests \) \
|
||||||
-exec rm -rf '{}' + \
|
-o \
|
||||||
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
|
||||||
|
\) -exec rm -rf '{}' + \
|
||||||
&& apt-get purge -y --auto-remove $buildDeps \
|
&& apt-get purge -y --auto-remove $buildDeps \
|
||||||
&& rm -rf /usr/src/python ~/.cache
|
&& rm -rf /usr/src/python ~/.cache
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue