Skip to content

Commit

Permalink
docker: add support for latest setuptools
Browse files Browse the repository at this point in the history
Configure setuptools to use distutils provided by the standard Python
library instead of the vendored one in setuptools, so that editable
installations are stored in the right directory.
  • Loading branch information
mdonadoni committed Dec 4, 2023
1 parent 0069691 commit 96a99e3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ FROM docker.io/library/ubuntu:20.04
# Use default answers in installation commands
ENV DEBIAN_FRONTEND=noninteractive

# Use distutils provided by the standard Python library instead of the vendored one in
# setuptools, so that editable installations are stored in the right directory.
# See https://github.com/pypa/setuptools/issues/3301
ENV SETUPTOOLS_USE_DISTUTILS=stdlib

# Prepare list of Python dependencies
COPY requirements.txt /code/

Expand All @@ -23,7 +28,7 @@ RUN apt-get update -y && \
python3-dev \
python3-pip \
vim-tiny && \
pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir --upgrade pip setuptools && \
pip install --no-cache-dir -r /code/requirements.txt && \
apt-get remove -y \
gcc \
Expand Down

0 comments on commit 96a99e3

Please sign in to comment.