Skip to content

Commit

Permalink
Add environment variable to speed up pip reruns (#125)
Browse files Browse the repository at this point in the history
Add environment variable to speed up pip reruns, see pypa/pip#12079 .  Needed until next version of pip (23.2.X is released)
  • Loading branch information
fredvd committed Jul 6, 2023
1 parent 3332c2f commit 7e96786
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ WORKDIR /app
COPY --from=builder --chown=500:500 /app /app

# Enable compilation of po files into mo files (This is added here for backward compatibility)

ENV zope_i18n_compile_mo_files=true
# https://github.com/pypa/pip/issues/12079
ENV _PIP_USE_IMPORTLIB_METADATA=0

# Link /data (the exposed volume) into /app/var
RUN ln -s /data /app/var
5 changes: 5 additions & 0 deletions Dockerfile.acceptance
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ARG PYTHON_VERSION=3.11
ARG PLONE_VERSION
FROM plone/server-builder:${PLONE_VERSION} as builder

# https://github.com/pypa/pip/issues/12079
ENV _PIP_USE_IMPORTLIB_METADATA=0

# Install robotframework support
RUN /app/bin/pip install plone.app.robotframework>=2.0.0

Expand All @@ -29,6 +32,8 @@ ENV LISTEN_PORT=${ZSERVER_PORT}
ENV APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage
# Packages to be used in configuration
ENV CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors
# https://github.com/pypa/pip/issues/12079
ENV _PIP_USE_IMPORTLIB_METADATA=0

RUN ln -s /data /app/var

Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.classicui
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ RUN ln -s /data /app/var

# Setup default type for site creation to be classic
ENV TYPE=classic
# https://github.com/pypa/pip/issues/12079
ENV _PIP_USE_IMPORTLIB_METADATA=0
3 changes: 2 additions & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ ENV DEBUG_MODE on
ENV zope_i18n_compile_mo_files=
# Set chameleon cache directory
ENV CHAMELEON_CACHE /app/var/cache

# https://github.com/pypa/pip/issues/12079
ENV _PIP_USE_IMPORTLIB_METADATA=0
# Expose Zope Port
EXPOSE 8080

Expand Down

0 comments on commit 7e96786

Please sign in to comment.