fix: ensure __init__.py exists for zope to avoid import failures

This commit is contained in:
Théophile Diot 2024-11-26 11:40:50 +01:00
parent d5b6fe6c03
commit 65040dec6f
No known key found for this signature in database
GPG key ID: FA995104A0BA376A
6 changed files with 24 additions and 6 deletions

View file

@ -37,7 +37,10 @@ WORKDIR /usr/share/bunkerweb
RUN export MAKEFLAGS="-j$(nproc)" && \
mkdir -p deps/python && \
pip install --break-system-packages --no-cache-dir --require-hashes --ignore-installed -r /tmp/requirements-deps.txt && \
pip install --break-system-packages --no-cache-dir --require-hashes --force-reinstall --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
pip install --break-system-packages --no-cache-dir --require-hashes --force-reinstall --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs) && \
if [ ! -f deps/python/zope/__init__.py ]; then \
touch deps/python/zope/__init__.py; \
fi # Ensure __init__.py exists to avoid import failures
# Copy files
# can't exclude deps from . so we are copying everything by hand

View file

@ -33,7 +33,10 @@ WORKDIR /usr/share/bunkerweb
RUN export MAKEFLAGS="-j$(nproc)" && \
mkdir -p deps/python && \
pip install --no-cache-dir --require-hashes --ignore-installed -r /tmp/requirements-deps.txt && \
pip install --no-cache-dir --require-hashes --force-reinstall --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
pip install --no-cache-dir --require-hashes --force-reinstall --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs) && \
if [ ! -f deps/python/zope/__init__.py ]; then \
touch deps/python/zope/__init__.py; \
fi # Ensure __init__.py exists to avoid import failures
# Copy files
# can't exclude deps from . so we are copying everything by hand

View file

@ -44,7 +44,10 @@ RUN export MAKEFLAGS="-j$(nproc)" && \
mkdir -p deps/python && \
easy_install-3.9 pip && \
pip install --no-cache-dir --require-hashes --ignore-installed -r /tmp/requirements-deps.txt && \
pip install --no-cache-dir --require-hashes --force-reinstall --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
pip install --no-cache-dir --require-hashes --force-reinstall --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs) && \
if [ ! -f deps/python/zope/__init__.py ]; then \
touch deps/python/zope/__init__.py; \
fi # Ensure __init__.py exists to avoid import failures
# Copy files
# can't exclude deps from . so we are copying everything by hand

View file

@ -45,7 +45,10 @@ RUN export MAKEFLAGS="-j$(nproc)" && \
mkdir -p deps/python && \
python3 -m ensurepip --upgrade && \
python3 -m pip install --no-cache-dir --require-hashes --ignore-installed -r /tmp/requirements-deps.txt && \
python3 -m pip install --no-cache-dir --require-hashes --force-reinstall --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
python3 -m pip install --no-cache-dir --require-hashes --force-reinstall --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs) && \
if [ ! -f deps/python/zope/__init__.py ]; then \
touch deps/python/zope/__init__.py; \
fi # Ensure __init__.py exists to avoid import failures
# Copy files
# can't exclude deps from . so we are copying everything by hand

View file

@ -37,7 +37,10 @@ WORKDIR /usr/share/bunkerweb
RUN export MAKEFLAGS="-j$(nproc)" && \
mkdir -p deps/python && \
pip install --no-cache-dir --require-hashes --break-system-packages --ignore-installed -r /tmp/requirements-deps.txt && \
pip install --no-cache-dir --require-hashes --break-system-packages --force-reinstall --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
pip install --no-cache-dir --require-hashes --break-system-packages --force-reinstall --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs) && \
if [ ! -f deps/python/zope/__init__.py ]; then \
touch deps/python/zope/__init__.py; \
fi # Ensure __init__.py exists to avoid import failures
# Copy files
# can't exclude deps from . so we are copying everything by hand

View file

@ -37,7 +37,10 @@ WORKDIR /usr/share/bunkerweb
RUN export MAKEFLAGS="-j$(nproc)" && \
mkdir -p deps/python && \
pip install --no-cache-dir --require-hashes --ignore-installed -r /tmp/requirements-deps.txt && \
pip install --no-cache-dir --require-hashes --force-reinstall --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
pip install --no-cache-dir --require-hashes --force-reinstall --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs) && \
if [ ! -f deps/python/zope/__init__.py ]; then \
touch deps/python/zope/__init__.py; \
fi # Ensure __init__.py exists to avoid import failures
# Copy files
# can't exclude deps from . so we are copying everything by hand