From: vpachchi Date: Fri, 13 Jun 2025 12:46:33 +0000 (-0400) Subject: Fix import issues with o2app X-Git-Tag: l-release~3 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=84b7ec2870f70e44f4d11d5e7fcb44bdc56aedbf;p=pti%2Fo2.git Fix import issues with o2app - Fix FromAsCasing Warning making Keywords to capital case - Update setuptools to 78.1.1 for CVE-2025-47273 - Added PYTHONPATH environment variable for better importing TestPlan: PASS : Build the container image PASS : Run a container from the image PASS : Start pubsub with python PASS : python /src/o2app/entrypoints/redis_eventconsumer.py PASS : Confirm log ModuleNotFoundError: No module named 'o2app' is not present Change-Id: I3bea247f2f1f139b7f79a1891fed277dfe05aef4 Signed-off-by: vpachchi --- diff --git a/Dockerfile b/Dockerfile index 8701183..4770839 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nexus3.onap.org:10001/onap/integration-python:12.0.0 as build +FROM nexus3.onap.org:10001/onap/integration-python:12.0.0 AS build # https://nexus3.onap.org/#browse/search=keyword%3Dintegration-python:d406d405e4cfbf1186265b01088caf9a # https://git.onap.org/integration/docker/onap-python/tree/Dockerfile @@ -40,7 +40,7 @@ ENV PATH="/.venv/bin:${PATH}" RUN mkdir -p /.venv && \ python -m venv /.venv \ - && pip install --no-cache-dir --upgrade pip setuptools==70.0 \ + && pip install --no-cache-dir --upgrade pip setuptools==78.1.1 \ && pip install --no-cache-dir -r /tmp/requirements.txt -r /tmp/requirements-stx.txt -c /tmp/constraints.txt \ && pip install --no-cache-dir -e /src @@ -92,3 +92,4 @@ WORKDIR /src # USER $user ENV PYTHONHASHSEED=0 ENV PATH="/.venv/bin:${PATH}" +ENV PYTHONPATH="/src"