Skip to content

Commit

Permalink
Add fix for python 3.12 (#29)
Browse files Browse the repository at this point in the history
This PR makes the following changes:

- Adds a fix in the Dockerfile that checks to see if `distutils` exists,
and if it doesn't then it installs `setuptools` which includes it.
  - This is because teraslice builds will fail without `distutils`

The node 22.2.0 alpine image for amd64 will install python `3.12` which
will cause this issue. Below is a link with the new changes from python
`3.11` to `3.12`:
https://www.python.org/downloads/release/python-3123/
  • Loading branch information
sotojn authored May 28, 2024
1 parent 750cf9a commit f16f22e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ RUN apk --no-cache add \
bsd-compat-headers \
py-setuptools

# Check to see if distutils is installed because python 3.12 removed it
RUN python3 -c "import distutils" || (apk update && apk add py3-setuptools)

ENV NPM_CONFIG_LOGLEVEL error
ENV WITH_SASL 0

Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.core
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ RUN apk --no-cache add \
cyrus-sasl-dev \
python3

# Check to see if distutils is installed because python 3.12 removed it
RUN python3 -c "import distutils" || (apk update && apk add py3-setuptools)

ENV NPM_CONFIG_LOGLEVEL error
ENV WITH_SASL 0

Expand Down

0 comments on commit f16f22e

Please sign in to comment.