Skip to content

Commit c5afee6

Browse files
committed
Python 3.7: Install libuuid packages for native _uuid module
1 parent bc99932 commit c5afee6

File tree

6 files changed

+18
-0
lines changed

6 files changed

+18
-0
lines changed

3.7/alpine3.7/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ RUN set -ex \
5959
tcl-dev \
6060
tk \
6161
tk-dev \
62+
util-linux-dev \
6263
xz-dev \
6364
zlib-dev \
6465
# add build deps before removing fetch deps in case there's overlap

3.7/alpine3.8/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ RUN set -ex \
5959
tcl-dev \
6060
tk \
6161
tk-dev \
62+
util-linux-dev \
6263
xz-dev \
6364
zlib-dev \
6465
# add build deps before removing fetch deps in case there's overlap

3.7/stretch/slim/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ RUN set -ex \
4040
libssl-dev \
4141
make \
4242
tk-dev \
43+
uuid-dev \
4344
wget \
4445
xz-utils \
4546
zlib1g-dev \

Dockerfile-alpine.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ RUN set -ex \
5555
tcl-dev \
5656
tk \
5757
tk-dev \
58+
util-linux-dev \
5859
xz-dev \
5960
zlib-dev \
6061
# add build deps before removing fetch deps in case there's overlap

Dockerfile-slim.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ RUN set -ex \
3434
libssl-dev \
3535
make \
3636
tk-dev \
37+
uuid-dev \
3738
wget \
3839
xz-utils \
3940
zlib1g-dev \

update.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,19 @@ for version in "${versions[@]}"; do
165165
mv "$dir/Dockerfile.new" "$dir/Dockerfile"
166166
fi
167167

168+
# https://bugs.python.org/issue11063, https://bugs.python.org/issue20519 (Python 3.7.0+)
169+
# A new native _uuid module improves uuid import time and avoids using ctypes.
170+
# This requires the development libuuid headers.
171+
case "$version" in
172+
3.4* | 3.5* | 3.6*)
173+
if [[ "$v" = alpine* ]]; then
174+
sed -ri -e '/util-linux-dev/d' "$dir/Dockerfile"
175+
else
176+
sed -ri -e '/uuid-dev/d' "$dir/Dockerfile"
177+
fi
178+
;;
179+
esac
180+
168181
case "$version/$v" in
169182
# https://bugs.python.org/issue32598 (Python 3.7.0b1+)
170183
# TL;DR: Python 3.7+ uses OpenSSL functionality which LibreSSL 2.6.x in Alpine 3.7 doesn't implement

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