Skip to content

Commit 491da1c

Browse files
authored
Merge pull request #326 from JayH5/py3.7-uuid
Python 3.7: Install libuuid packages for native _uuid module
2 parents bc99932 + 8601079 commit 491da1c

File tree

8 files changed

+17
-1
lines changed

8 files changed

+17
-1
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/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ENV LANG C.UTF-8
1616
# extra dependencies (over what buildpack-deps already includes)
1717
RUN apt-get update && apt-get install -y --no-install-recommends \
1818
tk-dev \
19+
uuid-dev \
1920
&& rm -rf /var/lib/apt/lists/*
2021

2122
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D

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-debian.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1212
# Python 3.4 on Stretch+ needs to use an older version of "libssl-dev" (these lines both get removed for every other combination)
1313
libssl-dev \
1414
tk-dev \
15+
uuid-dev \
1516
&& rm -rf /var/lib/apt/lists/*
1617

1718
ENV GPG_KEY %%PLACEHOLDER%%

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: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,18 @@ for version in "${versions[@]}"; do
174174
;;& # (3.5*/alpine* needs to match the next block too)
175175
# Libraries to build the nis module only available in Alpine 3.7+.
176176
# Also require this patch https://bugs.python.org/issue32521 only available in Python 2.7, 3.6+.
177-
3.4*/alpine* | 3.5*/alpine* | */alpine3.6)
177+
3.[4-5]*/alpine* | */alpine3.6)
178178
sed -ri -e '/libnsl-dev/d' -e '/libtirpc-dev/d' "$dir/Dockerfile"
179+
;;& # (3.4*/alpine* and 3.5*/alpine* need to match the next block too)
180+
# https://bugs.python.org/issue11063, https://bugs.python.org/issue20519 (Python 3.7.0+)
181+
# A new native _uuid module improves uuid import time and avoids using ctypes.
182+
# This requires the development libuuid headers.
183+
3.[4-6]*/alpine*)
184+
sed -ri -e '/util-linux-dev/d' "$dir/Dockerfile"
179185
;;
186+
3.[4-6]*)
187+
sed -ri -e '/uuid-dev/d' "$dir/Dockerfile"
188+
;;& # (other Debian variants need to match later blocks)
180189
3.4/stretch*)
181190
sed -ri -e 's/libssl-dev/libssl1.0-dev/g' "$dir/Dockerfile"
182191
;;

0 commit comments

Comments
 (0)