Skip to content

Commit

Permalink
Fix missing distutils in runtime <= 3.11 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelange authored May 7, 2024
1 parent ffc35fa commit d45e680
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# run PRs with BASE_TAG master because base won't be pushed
# on python_minor_version < 12, apt-install python3.x-distutils (used to be part of stdlib) instead of apt-install python3.x
build-args: |
BASE_IMAGE=${{ env.REGISTRY }}/${{ github.repository }}/base
BASE_TAG=${{ github.event_name != 'pull_request' && github.sha || 'master' }}
PYTHON_MINOR_VERSION=${{ matrix.python_minor_version }}
PYTHON_MINOR_VERSION=${{ matrix.python_minor_version }}${{ (matrix.python_minor_version < 12 && '-distutils') || '' }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.image }}:${{ (startsWith(matrix.image, 'runtime') && format('3.{0}-', matrix.python_minor_version)) || '' }}buildcache
cache-to: ${{ github.event_name != 'pull_request' && env.CACHE_TO_STRING || '' }}
provenance: false
Expand Down
4 changes: 1 addition & 3 deletions runtime/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ ARG BASE_TAG
FROM ${BASE_IMAGE}:${BASE_TAG}

ARG PYTHON_MINOR_VERSION
RUN apt-install \
python3.${PYTHON_MINOR_VERSION}-minimal \
libpython3.${PYTHON_MINOR_VERSION}-stdlib
RUN apt-install python3.${PYTHON_MINOR_VERSION}

0 comments on commit d45e680

Please sign in to comment.