Skip to content

Commit 01d2061

Browse files
committed
Added Ubuntu builds
1 parent 970a23e commit 01d2061

File tree

7 files changed

+823
-1
lines changed

7 files changed

+823
-1
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ matrix:
66
- os: windows
77
dist: 1803-containers
88
env: VERSION=3.8 VARIANT=windows/windowsservercore-1803
9+
- os: linux
10+
env: VERSION=3.8 VARIANT=ubuntu-bionic
11+
- os: linux
12+
env: VERSION=3.8 VARIANT=ubuntu-xenial
913
- os: linux
1014
env: VERSION=3.8 VARIANT=buster
1115
- os: linux
@@ -15,6 +19,10 @@ matrix:
1519
- os: windows
1620
dist: 1803-containers
1721
env: VERSION=3.7 VARIANT=windows/windowsservercore-1803
22+
- os: linux
23+
env: VERSION=3.7 VARIANT=ubuntu-bionic
24+
- os: linux
25+
env: VERSION=3.7 VARIANT=ubuntu-xenial
1826
- os: linux
1927
env: VERSION=3.7 VARIANT=buster
2028
- os: linux

3.7/ubuntu-bionic/Dockerfile

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM ubuntu:bionic
8+
9+
# ensure local python is preferred over distribution python
10+
ENV PATH /usr/local/bin:$PATH
11+
12+
# http://bugs.python.org/issue19846
13+
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
14+
ENV LANG C.UTF-8
15+
16+
# Disable any interactive prompts
17+
ENV DEBIAN_FRONTEND noninteractive
18+
19+
# runtime dependencies
20+
RUN apt-get update && apt-get install -y --no-install-recommends \
21+
ca-certificates \
22+
netbase \
23+
&& rm -rf /var/lib/apt/lists/*
24+
25+
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
26+
ENV PYTHON_VERSION 3.7.5
27+
28+
RUN set -ex \
29+
\
30+
&& savedAptMark="$(apt-mark showmanual)" \
31+
&& apt-get update && apt-get install -y --no-install-recommends \
32+
dpkg-dev \
33+
gcc \
34+
libbz2-dev \
35+
libc6-dev \
36+
libexpat1-dev \
37+
libffi-dev \
38+
libgdbm-dev \
39+
liblzma-dev \
40+
libncursesw5-dev \
41+
libreadline-dev \
42+
libsqlite3-dev \
43+
libssl-dev \
44+
make \
45+
tk-dev \
46+
uuid-dev \
47+
wget \
48+
xz-utils \
49+
zlib1g-dev \
50+
# as of Stretch, "gpg" is no longer included by default
51+
$(command -v gpg > /dev/null || echo 'gnupg dirmngr') \
52+
\
53+
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
54+
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
55+
&& export GNUPGHOME="$(mktemp -d)" \
56+
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
57+
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
58+
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
59+
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
60+
&& mkdir -p /usr/src/python \
61+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
62+
&& rm python.tar.xz \
63+
\
64+
&& cd /usr/src/python \
65+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
66+
&& ./configure \
67+
--build="$gnuArch" \
68+
--enable-loadable-sqlite-extensions \
69+
--enable-optimizations \
70+
--enable-shared \
71+
--with-system-expat \
72+
--with-system-ffi \
73+
--without-ensurepip \
74+
&& make -j "$(nproc)" \
75+
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
76+
PROFILE_TASK='-m test.regrtest --pgo \
77+
test_array \
78+
test_base64 \
79+
test_binascii \
80+
test_binhex \
81+
test_binop \
82+
test_bytes \
83+
test_c_locale_coercion \
84+
test_class \
85+
test_cmath \
86+
test_codecs \
87+
test_compile \
88+
test_complex \
89+
test_csv \
90+
test_decimal \
91+
test_dict \
92+
test_float \
93+
test_fstring \
94+
test_hashlib \
95+
test_io \
96+
test_iter \
97+
test_json \
98+
test_long \
99+
test_math \
100+
test_memoryview \
101+
test_pickle \
102+
test_re \
103+
test_set \
104+
test_slice \
105+
test_struct \
106+
test_threading \
107+
test_time \
108+
test_traceback \
109+
test_unicode \
110+
' \
111+
&& make install \
112+
&& ldconfig \
113+
\
114+
&& apt-mark auto '.*' > /dev/null \
115+
&& apt-mark manual $savedAptMark \
116+
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
117+
| awk '/=>/ { print $(NF-1) }' \
118+
| sort -u \
119+
| xargs -r dpkg-query --search \
120+
| cut -d: -f1 \
121+
| sort -u \
122+
| xargs -r apt-mark manual \
123+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
124+
&& rm -rf /var/lib/apt/lists/* \
125+
\
126+
&& find /usr/local -depth \
127+
\( \
128+
\( -type d -a \( -name test -o -name tests \) \) \
129+
-o \
130+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
131+
\) -exec rm -rf '{}' + \
132+
&& rm -rf /usr/src/python \
133+
\
134+
&& python3 --version
135+
136+
# make some useful symlinks that are expected to exist
137+
RUN cd /usr/local/bin \
138+
&& ln -s idle3 idle \
139+
&& ln -s pydoc3 pydoc \
140+
&& ln -s python3 python \
141+
&& ln -s python3-config python-config
142+
143+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
144+
ENV PYTHON_PIP_VERSION 19.3.1
145+
# https://github.com/pypa/get-pip
146+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/ffe826207a010164265d9cc807978e3604d18ca0/get-pip.py
147+
ENV PYTHON_GET_PIP_SHA256 b86f36cc4345ae87bfd4f10ef6b2dbfa7a872fbff70608a1e43944d283fd0eee
148+
149+
RUN set -ex; \
150+
\
151+
savedAptMark="$(apt-mark showmanual)"; \
152+
apt-get update; \
153+
apt-get install -y --no-install-recommends wget; \
154+
\
155+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
156+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
157+
\
158+
apt-mark auto '.*' > /dev/null; \
159+
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
160+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
161+
rm -rf /var/lib/apt/lists/*; \
162+
\
163+
python get-pip.py \
164+
--disable-pip-version-check \
165+
--no-cache-dir \
166+
"pip==$PYTHON_PIP_VERSION" \
167+
; \
168+
pip --version; \
169+
\
170+
find /usr/local -depth \
171+
\( \
172+
\( -type d -a \( -name test -o -name tests \) \) \
173+
-o \
174+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
175+
\) -exec rm -rf '{}' +; \
176+
rm -f get-pip.py
177+
178+
CMD ["python3"]

3.7/ubuntu-xenial/Dockerfile

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM ubuntu:xenial
8+
9+
# ensure local python is preferred over distribution python
10+
ENV PATH /usr/local/bin:$PATH
11+
12+
# http://bugs.python.org/issue19846
13+
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
14+
ENV LANG C.UTF-8
15+
16+
# Disable any interactive prompts
17+
ENV DEBIAN_FRONTEND noninteractive
18+
19+
# runtime dependencies
20+
RUN apt-get update && apt-get install -y --no-install-recommends \
21+
ca-certificates \
22+
netbase \
23+
&& rm -rf /var/lib/apt/lists/*
24+
25+
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
26+
ENV PYTHON_VERSION 3.7.5
27+
28+
RUN set -ex \
29+
\
30+
&& savedAptMark="$(apt-mark showmanual)" \
31+
&& apt-get update && apt-get install -y --no-install-recommends \
32+
dpkg-dev \
33+
gcc \
34+
libbz2-dev \
35+
libc6-dev \
36+
libexpat1-dev \
37+
libffi-dev \
38+
libgdbm-dev \
39+
liblzma-dev \
40+
libncursesw5-dev \
41+
libreadline-dev \
42+
libsqlite3-dev \
43+
libssl-dev \
44+
make \
45+
tk-dev \
46+
uuid-dev \
47+
wget \
48+
xz-utils \
49+
zlib1g-dev \
50+
# as of Stretch, "gpg" is no longer included by default
51+
$(command -v gpg > /dev/null || echo 'gnupg dirmngr') \
52+
\
53+
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
54+
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
55+
&& export GNUPGHOME="$(mktemp -d)" \
56+
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
57+
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
58+
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
59+
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
60+
&& mkdir -p /usr/src/python \
61+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
62+
&& rm python.tar.xz \
63+
\
64+
&& cd /usr/src/python \
65+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
66+
&& ./configure \
67+
--build="$gnuArch" \
68+
--enable-loadable-sqlite-extensions \
69+
--enable-optimizations \
70+
--enable-shared \
71+
--with-system-expat \
72+
--with-system-ffi \
73+
--without-ensurepip \
74+
&& make -j "$(nproc)" \
75+
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
76+
PROFILE_TASK='-m test.regrtest --pgo \
77+
test_array \
78+
test_base64 \
79+
test_binascii \
80+
test_binhex \
81+
test_binop \
82+
test_bytes \
83+
test_c_locale_coercion \
84+
test_class \
85+
test_cmath \
86+
test_codecs \
87+
test_compile \
88+
test_complex \
89+
test_csv \
90+
test_decimal \
91+
test_dict \
92+
test_float \
93+
test_fstring \
94+
test_hashlib \
95+
test_io \
96+
test_iter \
97+
test_json \
98+
test_long \
99+
test_math \
100+
test_memoryview \
101+
test_pickle \
102+
test_re \
103+
test_set \
104+
test_slice \
105+
test_struct \
106+
test_threading \
107+
test_time \
108+
test_traceback \
109+
test_unicode \
110+
' \
111+
&& make install \
112+
&& ldconfig \
113+
\
114+
&& apt-mark auto '.*' > /dev/null \
115+
&& apt-mark manual $savedAptMark \
116+
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
117+
| awk '/=>/ { print $(NF-1) }' \
118+
| sort -u \
119+
| xargs -r dpkg-query --search \
120+
| cut -d: -f1 \
121+
| sort -u \
122+
| xargs -r apt-mark manual \
123+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
124+
&& rm -rf /var/lib/apt/lists/* \
125+
\
126+
&& find /usr/local -depth \
127+
\( \
128+
\( -type d -a \( -name test -o -name tests \) \) \
129+
-o \
130+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
131+
\) -exec rm -rf '{}' + \
132+
&& rm -rf /usr/src/python \
133+
\
134+
&& python3 --version
135+
136+
# make some useful symlinks that are expected to exist
137+
RUN cd /usr/local/bin \
138+
&& ln -s idle3 idle \
139+
&& ln -s pydoc3 pydoc \
140+
&& ln -s python3 python \
141+
&& ln -s python3-config python-config
142+
143+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
144+
ENV PYTHON_PIP_VERSION 19.3.1
145+
# https://github.com/pypa/get-pip
146+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/ffe826207a010164265d9cc807978e3604d18ca0/get-pip.py
147+
ENV PYTHON_GET_PIP_SHA256 b86f36cc4345ae87bfd4f10ef6b2dbfa7a872fbff70608a1e43944d283fd0eee
148+
149+
RUN set -ex; \
150+
\
151+
savedAptMark="$(apt-mark showmanual)"; \
152+
apt-get update; \
153+
apt-get install -y --no-install-recommends wget; \
154+
\
155+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
156+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
157+
\
158+
apt-mark auto '.*' > /dev/null; \
159+
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
160+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
161+
rm -rf /var/lib/apt/lists/*; \
162+
\
163+
python get-pip.py \
164+
--disable-pip-version-check \
165+
--no-cache-dir \
166+
"pip==$PYTHON_PIP_VERSION" \
167+
; \
168+
pip --version; \
169+
\
170+
find /usr/local -depth \
171+
\( \
172+
\( -type d -a \( -name test -o -name tests \) \) \
173+
-o \
174+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
175+
\) -exec rm -rf '{}' +; \
176+
rm -f get-pip.py
177+
178+
CMD ["python3"]

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