Skip to content

Commit 826191f

Browse files
committed
Dockerfile: Add a focal workaround through a sed hack
1 parent 578182f commit 826191f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ RUN <<EOR
88
set -eu
99

1010
# Workaround for outstanding fix of https://bugs.launchpad.net/ubuntu/+source/python-build/+bug/1992108
11-
if grep -q ^UBUNTU_CODENAME=jammy /etc/os-release; then
11+
. /etc/os-release
12+
if [ ${UBUNTU_CODENAME} = 'jammy' ]; then
1213
echo >>/etc/apt/sources.list.d/jammy-proposed.list 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-proposed universe'
1314
echo >>/etc/apt/sources.list.d/jammy-proposed.list 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-proposed universe'
1415
fi
@@ -48,6 +49,12 @@ ARG TARGET=/build
4849
RUN <<EOR
4950
set -eu
5051

52+
# Focal workaround, until it is removed completely, builds a semi-broken image (About does not work at minimum)
53+
. /etc/os-release
54+
if [ ${UBUNTU_CODENAME} = 'focal' ]; then
55+
sed -i -e 's/>=3.9/>=3.8/' -e 's/py39/py38/' pyproject.toml
56+
fi
57+
5158
python -m build --wheel
5259
python -m venv .env
5360
. .env/bin/activate

0 commit comments

Comments
 (0)