From 309c5d0fe93a735e7aba94d1da7a9a36fe8de09d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Diot?= Date: Thu, 4 Jan 2024 14:25:04 +0000 Subject: [PATCH] Fix weird shenanigans with zope python deps --- src/linux/Dockerfile-centos | 3 ++- src/linux/Dockerfile-debian | 3 ++- src/linux/Dockerfile-fedora | 3 ++- src/linux/Dockerfile-rhel | 3 ++- src/linux/Dockerfile-ubuntu | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/linux/Dockerfile-centos b/src/linux/Dockerfile-centos index 8faba7f9a..2fce887a9 100644 --- a/src/linux/Dockerfile-centos +++ b/src/linux/Dockerfile-centos @@ -44,7 +44,8 @@ RUN mkdir -p deps/python && \ # Compile and install dependencies RUN export MAKEFLAGS="-j$(nproc)" && \ pip install --no-cache-dir --ignore-installed --require-hashes -r /tmp/requirements-deps.txt && \ - pip install --no-cache-dir --require-hashes --target deps/python -r deps/requirements.txt + pip install --no-cache-dir --require-hashes --target deps/python -r deps/requirements.txt && \ + if [ ! -f /usr/share/bunkerweb/deps/python/zope/__init__.py ] ; then touch /usr/share/bunkerweb/deps/python/zope/__init__.py ; fi # Copy files # can't exclude deps from . so we are copying everything by hand diff --git a/src/linux/Dockerfile-debian b/src/linux/Dockerfile-debian index 486afcfa9..761577c0f 100644 --- a/src/linux/Dockerfile-debian +++ b/src/linux/Dockerfile-debian @@ -44,7 +44,8 @@ RUN mkdir -p deps/python && \ # Compile and install dependencies RUN export MAKEFLAGS="-j$(nproc)" && \ pip install --break-system-packages --no-cache-dir --ignore-installed --require-hashes -r /tmp/requirements-deps.txt && \ - pip install --break-system-packages --no-cache-dir --require-hashes --target deps/python -r deps/requirements.txt + pip install --break-system-packages --no-cache-dir --require-hashes --target deps/python -r deps/requirements.txt && \ + if [ ! -f /usr/share/bunkerweb/deps/python/zope/__init__.py ] ; then touch /usr/share/bunkerweb/deps/python/zope/__init__.py ; fi # Copy files # can't exclude deps from . so we are copying everything by hand diff --git a/src/linux/Dockerfile-fedora b/src/linux/Dockerfile-fedora index b05801c11..5ab3d6a14 100644 --- a/src/linux/Dockerfile-fedora +++ b/src/linux/Dockerfile-fedora @@ -40,7 +40,8 @@ RUN mkdir -p deps/python && \ # Compile and install dependencies RUN export MAKEFLAGS="-j$(nproc)" && \ pip install --no-cache-dir --ignore-installed --require-hashes -r /tmp/requirements-deps.txt && \ - pip install --no-cache-dir --require-hashes --target deps/python -r deps/requirements.txt + pip install --no-cache-dir --require-hashes --target deps/python -r deps/requirements.txt && \ + if [ ! -f /usr/share/bunkerweb/deps/python/zope/__init__.py ] ; then touch /usr/share/bunkerweb/deps/python/zope/__init__.py ; fi # Copy files # can't exclude deps from . so we are copying everything by hand diff --git a/src/linux/Dockerfile-rhel b/src/linux/Dockerfile-rhel index ff8929dd1..3a13fd64e 100644 --- a/src/linux/Dockerfile-rhel +++ b/src/linux/Dockerfile-rhel @@ -56,7 +56,8 @@ RUN mkdir -p deps/python && \ RUN easy_install-3.9 pip && \ export MAKEFLAGS="-j$(nproc)" && \ pip install --no-cache-dir --ignore-installed --require-hashes -r /tmp/requirements-deps.txt && \ - pip install --no-cache-dir --require-hashes --target deps/python -r deps/requirements.txt + pip install --no-cache-dir --require-hashes --target deps/python -r deps/requirements.txt && \ + if [ ! -f /usr/share/bunkerweb/deps/python/zope/__init__.py ] ; then touch /usr/share/bunkerweb/deps/python/zope/__init__.py ; fi # Copy BW files # can't exclude deps from . so we are copying everything by hand diff --git a/src/linux/Dockerfile-ubuntu b/src/linux/Dockerfile-ubuntu index a7afdabac..2b968226e 100644 --- a/src/linux/Dockerfile-ubuntu +++ b/src/linux/Dockerfile-ubuntu @@ -44,7 +44,8 @@ RUN mkdir -p deps/python && \ # Compile and install dependencies RUN export MAKEFLAGS="-j$(nproc)" && \ pip install --no-cache-dir --ignore-installed --require-hashes -r /tmp/requirements-deps.txt && \ - pip install --no-cache-dir --require-hashes --target deps/python -r deps/requirements.txt + pip install --no-cache-dir --require-hashes --target deps/python -r deps/requirements.txt && \ + if [ ! -f /usr/share/bunkerweb/deps/python/zope/__init__.py ] ; then touch /usr/share/bunkerweb/deps/python/zope/__init__.py ; fi # Copy files # can't exclude deps from . so we are copying everything by hand