Skip to content

Commit 9424a08

Browse files
committed
More changes to remove stragglers of old setuptools.
Pip update needs to be done in both the stage1 and stage2 images. site-packages contain setuptools-65.5.0 in both stage1 and stage2. Because I copy stage1's site-packages to stage2, I need to remove the -65.5.0 directory in stage1 to prevent it from making the jump to stage 2. I do the pip update in stage2 before the copy, not after. So I don't have to worry about pip update messing with my locally installed files. But it does mean I have to pip update both stage1 and stage2. I could probably get away with just 1 pip update if I did it after the copy operation from stage1 into stage2 but... This way is probably safer.
1 parent 6ba293d commit 9424a08

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

scripts/Docker/Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ COPY scripts/Docker/sphinxdeps.txt .
6666
ENV PIP_ROOT_USER_ACTION=ignore
6767

6868
RUN set -xv && CWD=$PWD && \
69+
upgrades=$(python3 -m pip --no-cache --disable-pip-version-check \
70+
list --outdated | awk 'NR > 2 {print $1}'); \
71+
if [ -n "$upgrades" ]; then \
72+
echo Pip updating $upgrades; \
73+
python -m pip --no-cache --disable-pip-version-check \
74+
install -U $upgrades < /dev/null; \
75+
else \
76+
echo Nothing to pip update; \
77+
fi; \
78+
ls -l /usr/local/lib/python3.11/site-packages; \
6979
VER=$(apk list -I 'xapian-core-dev' | \
7080
sed 's/^xapian-core-dev-\([0-9.]*\)-.*/\1/') && \
7181
cd /tmp && \
@@ -148,7 +158,7 @@ RUN apk --update-cache upgrade; \
148158
if [ -n "$upgrades" ]; then \
149159
echo Pip updating $upgrades; \
150160
python -m pip --no-cache --disable-pip-version-check \
151-
install -U $upgrades; \
161+
install -U $upgrades < /dev/null; \
152162
else \
153163
echo Nothing to pip update; \
154164
fi

0 commit comments

Comments
 (0)