From 4b642855ea3d43f888ae131a2b1cf26909f14caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Wed, 23 Oct 2024 13:55:19 +0200 Subject: [PATCH] fix: install xonsh through Alpine repo --- executor/Dockerfile | 6 +++++- executor/sitecustomize.py | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/executor/Dockerfile b/executor/Dockerfile index b2fe6a1..67a92e1 100644 --- a/executor/Dockerfile +++ b/executor/Dockerfile @@ -84,6 +84,8 @@ RUN apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/t py3-xarray \ py3-xarray-pyc \ weasyprint \ + xonsh \ + xonsh-pyc \ yt-dlp # Create user manually -- Alpine does not support high UIDs @@ -99,10 +101,12 @@ USER executor RUN fc-cache -fv && python -c "import matplotlib.pyplot" # Python +ARG PYTHON_VERSION COPY requirements.txt requirements-skip.txt / RUN python -m venv --system-site-packages /venv && /venv/bin/pip install --no-cache-dir -r /requirements.txt -COPY sitecustomize.py /venv/lib/python3.12/site-packages +COPY sitecustomize.py /venv/lib/python${PYTHON_VERSION}/site-packages ENV PATH="/venv/bin:$PATH" +ENV PYTHONPATH="/venv/lib/python${PYTHON_VERSION}/site-packages/" # Pandoc COPY pandoc-wrapper /usr/local/bin/pandoc diff --git a/executor/sitecustomize.py b/executor/sitecustomize.py index b139c8b..c6a012b 100644 --- a/executor/sitecustomize.py +++ b/executor/sitecustomize.py @@ -1,7 +1,4 @@ import sys -import warnings - -warnings.filterwarnings("ignore", category=DeprecationWarning) original_import = __import__