Skip to content

Commit 2f0d83d

Browse files
authored
Merge pull request #137 from infosiftr/everythings-shiny-capn
Revert "dpkg-divert" and change PATH instead
2 parents 19bca6a + 7ea58b9 commit 2f0d83d

File tree

18 files changed

+85
-166
lines changed

18 files changed

+85
-166
lines changed

2.7/Dockerfile

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
FROM buildpack-deps:jessie
22

3-
# divert many traces of Debian Python (so that they are not used by mistake)
4-
# https://bugs.debian.org/33263 :(
5-
RUN set -ex \
6-
&& for bits in \
7-
# /etc/python* \
8-
/usr/bin/*2to3* \
9-
/usr/bin/*python* \
10-
/usr/bin/pdb* \
11-
/usr/bin/py* \
12-
# /usr/lib/python* \
13-
# /usr/share/python \
14-
; do \
15-
dpkg-divert --rename "$bits"; \
16-
done
3+
# ensure local python is used over debian python
4+
ENV PATH /usr/local/bin:$PATH
175

186
# http://bugs.python.org/issue19846
197
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
@@ -59,9 +47,9 @@ RUN set -ex \
5947
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
6048
&& find /usr/local -depth \
6149
\( \
62-
\( -type d -a -name test -o -name tests \) \
63-
-o \
64-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
50+
\( -type d -a -name test -o -name tests \) \
51+
-o \
52+
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
6553
\) -exec rm -rf '{}' + \
6654
&& apt-get purge -y --auto-remove $buildDeps \
6755
&& rm -rf /usr/src/python ~/.cache

2.7/alpine/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ RUN set -ex \
5050
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
5151
&& find /usr/local -depth \
5252
\( \
53-
\( -type d -a -name test -o -name tests \) \
54-
-o \
55-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
53+
\( -type d -a -name test -o -name tests \) \
54+
-o \
55+
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
5656
\) -exec rm -rf '{}' + \
5757
&& runDeps="$( \
5858
scanelf --needed --nobanner --recursive /usr/local \

2.7/slim/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM debian:jessie
22

3+
# ensure local python is used over debian python
4+
ENV PATH /usr/local/bin:$PATH
5+
36
# http://bugs.python.org/issue19846
47
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
58
ENV LANG C.UTF-8
@@ -57,9 +60,9 @@ RUN set -ex \
5760
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
5861
&& find /usr/local -depth \
5962
\( \
60-
\( -type d -a -name test -o -name tests \) \
61-
-o \
62-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
63+
\( -type d -a -name test -o -name tests \) \
64+
-o \
65+
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
6366
\) -exec rm -rf '{}' + \
6467
&& apt-get purge -y --auto-remove $buildDeps \
6568
&& rm -rf /usr/src/python ~/.cache

2.7/wheezy/Dockerfile

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
FROM buildpack-deps:wheezy
22

3-
# divert many traces of Debian Python (so that they are not used by mistake)
4-
# https://bugs.debian.org/33263 :(
5-
RUN set -ex \
6-
&& for bits in \
7-
# /etc/python* \
8-
/usr/bin/*2to3* \
9-
/usr/bin/*python* \
10-
/usr/bin/pdb* \
11-
/usr/bin/py* \
12-
# /usr/lib/python* \
13-
# /usr/share/python \
14-
; do \
15-
dpkg-divert --rename "$bits"; \
16-
done
3+
# ensure local python is used over debian python
4+
ENV PATH /usr/local/bin:$PATH
175

186
# http://bugs.python.org/issue19846
197
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
@@ -59,9 +47,9 @@ RUN set -ex \
5947
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
6048
&& find /usr/local -depth \
6149
\( \
62-
\( -type d -a -name test -o -name tests \) \
63-
-o \
64-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
50+
\( -type d -a -name test -o -name tests \) \
51+
-o \
52+
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
6553
\) -exec rm -rf '{}' + \
6654
&& apt-get purge -y --auto-remove $buildDeps \
6755
&& rm -rf /usr/src/python ~/.cache

3.3/Dockerfile

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
FROM buildpack-deps:jessie
22

3-
# divert many traces of Debian Python (so that they are not used by mistake)
4-
# https://bugs.debian.org/33263 :(
5-
RUN set -ex \
6-
&& for bits in \
7-
# /etc/python* \
8-
/usr/bin/*2to3* \
9-
/usr/bin/*python* \
10-
/usr/bin/pdb* \
11-
/usr/bin/py* \
12-
# /usr/lib/python* \
13-
# /usr/share/python \
14-
; do \
15-
dpkg-divert --rename "$bits"; \
16-
done
3+
# ensure local python is used over debian python
4+
ENV PATH /usr/local/bin:$PATH
175

186
# http://bugs.python.org/issue19846
197
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
@@ -59,9 +47,9 @@ RUN set -ex \
5947
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
6048
&& find /usr/local -depth \
6149
\( \
62-
\( -type d -a -name test -o -name tests \) \
63-
-o \
64-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
50+
\( -type d -a -name test -o -name tests \) \
51+
-o \
52+
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
6553
\) -exec rm -rf '{}' + \
6654
&& apt-get purge -y --auto-remove $buildDeps \
6755
&& rm -rf /usr/src/python ~/.cache

3.3/alpine/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ RUN set -ex \
5151
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
5252
&& find /usr/local -depth \
5353
\( \
54-
\( -type d -a -name test -o -name tests \) \
55-
-o \
56-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
54+
\( -type d -a -name test -o -name tests \) \
55+
-o \
56+
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
5757
\) -exec rm -rf '{}' + \
5858
&& runDeps="$( \
5959
scanelf --needed --nobanner --recursive /usr/local \

3.3/slim/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM debian:jessie
22

3+
# ensure local python is used over debian python
4+
ENV PATH /usr/local/bin:$PATH
5+
36
# http://bugs.python.org/issue19846
47
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
58
ENV LANG C.UTF-8
@@ -58,9 +61,9 @@ RUN set -ex \
5861
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
5962
&& find /usr/local -depth \
6063
\( \
61-
\( -type d -a -name test -o -name tests \) \
62-
-o \
63-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
64+
\( -type d -a -name test -o -name tests \) \
65+
-o \
66+
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
6467
\) -exec rm -rf '{}' + \
6568
&& apt-get purge -y --auto-remove $buildDeps \
6669
&& rm -rf /usr/src/python ~/.cache

3.3/wheezy/Dockerfile

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
FROM buildpack-deps:wheezy
22

3-
# divert many traces of Debian Python (so that they are not used by mistake)
4-
# https://bugs.debian.org/33263 :(
5-
RUN set -ex \
6-
&& for bits in \
7-
# /etc/python* \
8-
/usr/bin/*2to3* \
9-
/usr/bin/*python* \
10-
/usr/bin/pdb* \
11-
/usr/bin/py* \
12-
# /usr/lib/python* \
13-
# /usr/share/python \
14-
; do \
15-
dpkg-divert --rename "$bits"; \
16-
done
3+
# ensure local python is used over debian python
4+
ENV PATH /usr/local/bin:$PATH
175

186
# http://bugs.python.org/issue19846
197
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
@@ -59,9 +47,9 @@ RUN set -ex \
5947
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
6048
&& find /usr/local -depth \
6149
\( \
62-
\( -type d -a -name test -o -name tests \) \
63-
-o \
64-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
50+
\( -type d -a -name test -o -name tests \) \
51+
-o \
52+
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
6553
\) -exec rm -rf '{}' + \
6654
&& apt-get purge -y --auto-remove $buildDeps \
6755
&& rm -rf /usr/src/python ~/.cache

3.4/Dockerfile

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
FROM buildpack-deps:jessie
22

3-
# divert many traces of Debian Python (so that they are not used by mistake)
4-
# https://bugs.debian.org/33263 :(
5-
RUN set -ex \
6-
&& for bits in \
7-
# /etc/python* \
8-
/usr/bin/*2to3* \
9-
/usr/bin/*python* \
10-
/usr/bin/pdb* \
11-
/usr/bin/py* \
12-
# /usr/lib/python* \
13-
# /usr/share/python \
14-
; do \
15-
dpkg-divert --rename "$bits"; \
16-
done
3+
# ensure local python is used over debian python
4+
ENV PATH /usr/local/bin:$PATH
175

186
# http://bugs.python.org/issue19846
197
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
@@ -58,9 +46,9 @@ RUN set -ex \
5846
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
5947
&& find /usr/local -depth \
6048
\( \
61-
\( -type d -a -name test -o -name tests \) \
62-
-o \
63-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
49+
\( -type d -a -name test -o -name tests \) \
50+
-o \
51+
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
6452
\) -exec rm -rf '{}' + \
6553
&& apt-get purge -y --auto-remove $buildDeps \
6654
&& rm -rf /usr/src/python ~/.cache

3.4/alpine/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ RUN set -ex \
5151
&& [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
5252
&& find /usr/local -depth \
5353
\( \
54-
\( -type d -a -name test -o -name tests \) \
55-
-o \
56-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
54+
\( -type d -a -name test -o -name tests \) \
55+
-o \
56+
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
5757
\) -exec rm -rf '{}' + \
5858
&& runDeps="$( \
5959
scanelf --needed --nobanner --recursive /usr/local \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy