Skip to content

Commit

Permalink
Ensure that the import problem is reproducible
Browse files Browse the repository at this point in the history
  • Loading branch information
dwt committed Nov 26, 2024
1 parent 59451dd commit bf3831e
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 27 deletions.
44 changes: 23 additions & 21 deletions docker/ubuntu/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
version: "3.7"
services:
zms5:
build: .
image: zms5:ubuntu
ports:
- 8085:8085
- 8086:8086
- 8080:8080
- 5678:5678
environment:
- PYTHONUNBUFFERED="1"
- CONFIG_FILE="/home/zope/etc/zope.ini"
- INSTANCE_HOME="/home/zope"
- CLIENT_HOME="/home/zope"
- PYTHON="/home/zope/venv/bin/python"
- SOFTWARE_HOME="/home/zope/venv/bin"
volumes:
- ./etc/:/home/zope/etc/
- ./Extensions/:/home/zope/Extensions/:rw
- ./var/:/home/zope/var/
zms5:
image: zms5:ubuntu
pull_policy: build
build:
context: ../../
dockerfile: docker/ubuntu/dockerfile
ports:
- 8085:8085
- 8086:8086
- 8080:8080
- 5678:5678
environment:
- PYTHONUNBUFFERED="1"
- CONFIG_FILE="/home/zope/etc/zope.ini"
- INSTANCE_HOME="/home/zope"
- CLIENT_HOME="/home/zope"
- PYTHON="/home/zope/venv/bin/python"
- SOFTWARE_HOME="/home/zope/venv/bin"
volumes:
- ./etc/:/home/zope/etc/
- ./Extensions/:/home/zope/Extensions/:rw
- ./var/:/home/zope/var/

# command: /home/zope/etc/start.sh
# command: /home/zope/etc/start.sh
19 changes: 13 additions & 6 deletions docker/ubuntu/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@ ENV LANGUAGE=en_US.UTF-8

RUN python3 -m venv venv
RUN pip install -U pip wheel setuptools
RUN pip install -U -e git+https://github.com/zopefoundation/Zope.git@master#egg=Zope
RUN pip install -U -e git+https://github.com/zms-publishing/ZMS.git#egg=ZMS
# RUN pip install -U -e git+https://github.com/zopefoundation/Zope.git@master#egg=Zope
# RUN pip install -U -e git+https://github.com/zms-publishing/ZMS.git#egg=ZMS
RUN pip install Zope
COPY --chown=zope:zope Products Products
COPY --chown=zope:zope pyproject.toml setup.cfg setup.py requirements.txt \
README.rst requirements-zeo.txt \
.
RUN pip install -e .

RUN pip install -r https://raw.githubusercontent.com/zms-publishing/ZMS5/master/requirements-full.txt
RUN pip install ZEO
RUN pip install itsdangerous
Expand All @@ -34,9 +41,9 @@ RUN pip install itsdangerous
# Create Zope Instance
RUN mkwsgiinstance -d . -u admin:admin

COPY ./etc etc
COPY ./var var
COPY ./Extensions Extensions
COPY docker/ubuntu/etc etc
COPY docker/ubuntu/var var
COPY docker/ubuntu/Extensions Extensions

EXPOSE 8085
EXPOSE 8086
Expand All @@ -45,4 +52,4 @@ EXPOSE 5678

# Finally Start ZEO/Zope by Script
# ENTRYPOINT ["/bin/sh -c"]
CMD ["/home/zope/etc/start.sh"]
CMD ["/home/zope/etc/start.sh"]
11 changes: 11 additions & 0 deletions docker/ubuntu/import_fail_reproduction.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import importlib
import pkgutil
from pprint import pprint

import Products
# what the __path__ contains
pprint(Products.__path__)
# what python packaging suggests
pprint(list(pkgutil.iter_modules(Products.__path__, Products.__name__ + ".")))
# what the __path__ contains
pprint(Products.__path__)

0 comments on commit bf3831e

Please sign in to comment.