Fix import issues with o2app 62/14562/4
authorvpachchi <vineela.pachchipulusu@windriver.com>
Fri, 13 Jun 2025 12:46:33 +0000 (08:46 -0400)
committervpachchi <vineela.pachchipulusu@windriver.com>
Tue, 17 Jun 2025 14:58:37 +0000 (10:58 -0400)
- 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 <vineela.pachchipulusu@windriver.com>
Dockerfile

index 8701183..4770839 100644 (file)
@@ -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"