File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM buildpack-deps:wheezy
2
+
3
+ # remove several traces of debian python
4
+ RUN apt-get purge -y python.*
5
+
6
+ # http://bugs.python.org/issue19846
7
+ # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
8
+ ENV LANG C.UTF-8
9
+
10
+ ENV PYTHON_VERSION 3.3.6
11
+
12
+ RUN set -x \
13
+ && mkdir -p /usr/src/python \
14
+ && curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
15
+ | tar -xJC /usr/src/python --strip-components=1 \
16
+ && cd /usr/src/python \
17
+ && ./configure --enable-shared \
18
+ && make -j$(nproc) \
19
+ && make install \
20
+ && ldconfig \
21
+ && curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
22
+ && find /usr/local \
23
+ \( -type d -a -name test -o -name tests \) \
24
+ -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
25
+ -exec rm -rf '{}' + \
26
+ && rm -rf /usr/src/python
27
+
28
+ # make some useful symlinks that are expected to exist
29
+ RUN cd /usr/local/bin \
30
+ && ln -s idle3 idle \
31
+ && ln -s pydoc3 pydoc \
32
+ && ln -s python3 python \
33
+ && ln -s python-config3 python-config
34
+
35
+ CMD ["python3" ]
You can’t perform that action at this time.
0 commit comments