File tree Expand file tree Collapse file tree 18 files changed +85
-166
lines changed Expand file tree Collapse file tree 18 files changed +85
-166
lines changed Original file line number Diff line number Diff line change 1
1
FROM buildpack-deps:jessie
2
2
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
17
5
18
6
# http://bugs.python.org/issue19846
19
7
# > 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 \
59
47
&& [ "$(pip list | awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
60
48
&& find /usr/local -depth \
61
49
\( \
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' \) \
65
53
\) -exec rm -rf '{}' + \
66
54
&& apt-get purge -y --auto-remove $buildDeps \
67
55
&& rm -rf /usr/src/python ~/.cache
Original file line number Diff line number Diff line change @@ -50,9 +50,9 @@ RUN set -ex \
50
50
&& [ "$(pip list | awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
51
51
&& find /usr/local -depth \
52
52
\( \
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' \) \
56
56
\) -exec rm -rf '{}' + \
57
57
&& runDeps="$( \
58
58
scanelf --needed --nobanner --recursive /usr/local \
Original file line number Diff line number Diff line change 1
1
FROM debian:jessie
2
2
3
+ # ensure local python is used over debian python
4
+ ENV PATH /usr/local/bin:$PATH
5
+
3
6
# http://bugs.python.org/issue19846
4
7
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
5
8
ENV LANG C.UTF-8
@@ -57,9 +60,9 @@ RUN set -ex \
57
60
&& [ "$(pip list | awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
58
61
&& find /usr/local -depth \
59
62
\( \
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' \) \
63
66
\) -exec rm -rf '{}' + \
64
67
&& apt-get purge -y --auto-remove $buildDeps \
65
68
&& rm -rf /usr/src/python ~/.cache
Original file line number Diff line number Diff line change 1
1
FROM buildpack-deps:wheezy
2
2
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
17
5
18
6
# http://bugs.python.org/issue19846
19
7
# > 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 \
59
47
&& [ "$(pip list | awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
60
48
&& find /usr/local -depth \
61
49
\( \
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' \) \
65
53
\) -exec rm -rf '{}' + \
66
54
&& apt-get purge -y --auto-remove $buildDeps \
67
55
&& rm -rf /usr/src/python ~/.cache
Original file line number Diff line number Diff line change 1
1
FROM buildpack-deps:jessie
2
2
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
17
5
18
6
# http://bugs.python.org/issue19846
19
7
# > 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 \
59
47
&& [ "$(pip list | awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
60
48
&& find /usr/local -depth \
61
49
\( \
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' \) \
65
53
\) -exec rm -rf '{}' + \
66
54
&& apt-get purge -y --auto-remove $buildDeps \
67
55
&& rm -rf /usr/src/python ~/.cache
Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ RUN set -ex \
51
51
&& [ "$(pip list | awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
52
52
&& find /usr/local -depth \
53
53
\( \
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' \) \
57
57
\) -exec rm -rf '{}' + \
58
58
&& runDeps="$( \
59
59
scanelf --needed --nobanner --recursive /usr/local \
Original file line number Diff line number Diff line change 1
1
FROM debian:jessie
2
2
3
+ # ensure local python is used over debian python
4
+ ENV PATH /usr/local/bin:$PATH
5
+
3
6
# http://bugs.python.org/issue19846
4
7
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
5
8
ENV LANG C.UTF-8
@@ -58,9 +61,9 @@ RUN set -ex \
58
61
&& [ "$(pip list | awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
59
62
&& find /usr/local -depth \
60
63
\( \
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' \) \
64
67
\) -exec rm -rf '{}' + \
65
68
&& apt-get purge -y --auto-remove $buildDeps \
66
69
&& rm -rf /usr/src/python ~/.cache
Original file line number Diff line number Diff line change 1
1
FROM buildpack-deps:wheezy
2
2
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
17
5
18
6
# http://bugs.python.org/issue19846
19
7
# > 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 \
59
47
&& [ "$(pip list | awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
60
48
&& find /usr/local -depth \
61
49
\( \
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' \) \
65
53
\) -exec rm -rf '{}' + \
66
54
&& apt-get purge -y --auto-remove $buildDeps \
67
55
&& rm -rf /usr/src/python ~/.cache
Original file line number Diff line number Diff line change 1
1
FROM buildpack-deps:jessie
2
2
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
17
5
18
6
# http://bugs.python.org/issue19846
19
7
# > 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 \
58
46
&& [ "$(pip list | awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
59
47
&& find /usr/local -depth \
60
48
\( \
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' \) \
64
52
\) -exec rm -rf '{}' + \
65
53
&& apt-get purge -y --auto-remove $buildDeps \
66
54
&& rm -rf /usr/src/python ~/.cache
Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ RUN set -ex \
51
51
&& [ "$(pip list | awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
52
52
&& find /usr/local -depth \
53
53
\( \
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' \) \
57
57
\) -exec rm -rf '{}' + \
58
58
&& runDeps="$( \
59
59
scanelf --needed --nobanner --recursive /usr/local \
You can’t perform that action at this time.
0 commit comments