Skip to content

Commit 50fc273

Browse files
committed
Revert "Use "dpkg-divert" instead of "purge" to avoid Debian's Python"
- this reverts commit a819c92. - since Debian packages use an absolute path, they were broken by the diverts - ensure the local python is first in PATH
1 parent 19bca6a commit 50fc273

File tree

13 files changed

+31
-112
lines changed

13 files changed

+31
-112
lines changed

2.7/Dockerfile

Lines changed: 2 additions & 14 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.

2.7/slim/Dockerfile

Lines changed: 3 additions & 0 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

2.7/wheezy/Dockerfile

Lines changed: 2 additions & 14 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.

3.3/Dockerfile

Lines changed: 2 additions & 14 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.

3.3/slim/Dockerfile

Lines changed: 3 additions & 0 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

3.3/wheezy/Dockerfile

Lines changed: 2 additions & 14 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.

3.4/Dockerfile

Lines changed: 2 additions & 14 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.

3.4/slim/Dockerfile

Lines changed: 3 additions & 0 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

3.4/wheezy/Dockerfile

Lines changed: 2 additions & 14 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.

3.5/Dockerfile

Lines changed: 2 additions & 14 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.

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