Skip to content

Commit

Permalink
Rejection of using venv
Browse files Browse the repository at this point in the history
  • Loading branch information
unaxfromsibiria committed Dec 13, 2024
1 parent c883abe commit 228440c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM debian:bookworm

RUN apt update -y
RUN apt install python3-minimal python3-systemd python3-pip python3-setuptools python3-venv python3-virtualenv virtualenv -y
RUN apt install python3-minimal python3-systemd python3-pip python3-setuptools python3-venv -y

VOLUME /etc/jd2cw/

Expand All @@ -13,9 +13,8 @@ WORKDIR /jd2cw
COPY jd2cw /jd2cw/jd2cw
COPY setup.py /jd2cw/
# have to be python above 3.10
RUN mkdir /opt/venv3 && virtualenv /opt/venv3
RUN bash -c "source /opt/venv3/bin/activate && python3 --version && python3 -c 'import systemd'"
RUN bash -c "source /opt/venv3/bin/activate && pip install ./"
RUN python3 --version && python3 -c 'import systemd'"
RUN pip --break-system-packages install ./
RUN apt-get clean && rm -r ~/.cache && apt autoremove -y --purge && rm -rf /var/lib/apt/lists/*
# Set the entrypoint and default command
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM journald-2-cloudwatch

RUN bash -c "source /opt/venv3/bin/activate && pip install requests-mock==1.8.0 botocore==1.10.84 'pytest<7.0' pytest-cov && python3 -c 'import pip,pytest'"
RUN pip install --break-system-packages requests-mock==1.8.0 botocore==1.10.84 'pytest<7.0' pytest-cov && python3 -c 'import pip,pytest'
# botocore==1.10.84 <- is a monkeypatching 6 years old for passing tests in the developing process of release 0.2.0 version

ENTRYPOINT ["/opt/venv3/bin/python3", "-m", "pytest", "-ocache_dir=/dev/null", "/jd2cw/tests", "-vv", "--cov=jd2cw", "--cov-report=term", "--cov-report=xml:/tmp/codecov/coverage.xml"]
ENTRYPOINT ["python3", "-m", "pytest", "-ocache_dir=/dev/null", "/jd2cw/tests", "-vv", "--cov=jd2cw", "--cov-report=term", "--cov-report=xml:/tmp/codecov/coverage.xml"]

0 comments on commit 228440c

Please sign in to comment.