Skip to content

Commit

Permalink
always install into a virtualenv
Browse files Browse the repository at this point in the history
system-packages is required for RHSM
  • Loading branch information
evgeni committed Jul 17, 2024
1 parent 3165eba commit 580e34a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ install:
cd src/ && $(PYTHON) setup.py install

test-install:
$(PIP) install -r test-requirements.txt --user
$(PIP) install -r test-requirements.txt

test: test-install
$(PYTHON) test/unittest_suite.py
Expand Down
2 changes: 1 addition & 1 deletion images/Dockerfile.debian11
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM debian:11

RUN apt-get update && apt-get install --yes --no-install-recommends curl make python3 python3-pip python3-setuptools && apt-get clean
RUN apt-get update && apt-get install --yes --no-install-recommends curl make python3 python3-pip python3-setuptools python3-venv && apt-get clean
RUN curl -o /etc/apt/trusted.gpg.d/atix.asc https://oss.atix.de/atix_gpg.pub
RUN echo 'deb https://oss.atix.de/Debian11/ stable main' >> /etc/apt/sources.list
RUN apt-get update && apt-get install --yes --no-install-recommends python3-subscription-manager && apt-get clean
Expand Down
2 changes: 1 addition & 1 deletion images/Dockerfile.el7
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ FROM quay.io/centos/centos:7

RUN sed -i -e 's/^mirrorlist/#mirrorlist/g; /^#baseurl/ s/^#//; /baseurl/ s/mirror/vault/g' /etc/yum.repos.d/CentOS-Base.repo
RUN yum install -y epel-release https://yum.theforeman.org/client/nightly/el7/x86_64/foreman-client-release.rpm && yum clean all
RUN yum install make python-setuptools python-tracer subscription-manager python-pip python2-mock -y && yum clean all
RUN yum install make python-setuptools python-tracer subscription-manager python-pip python-virtualenv python2-mock -y && yum clean all
WORKDIR /app
2 changes: 1 addition & 1 deletion images/Dockerfile.suseLeap42
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ FROM opensuse/leap:42
RUN zypper addrepo -c --no-gpgcheck https://oss.atix.de/SLES12SP5/ subscription-manager
RUN zypper removerepo 'OSS Update'
RUN zypper clean --all
RUN zypper install -y make python-pip subscription-manager zypp-plugin-python which python-setuptools lsof
RUN zypper install -y make python-pip subscription-manager zypp-plugin-python which python-setuptools python-virtualenv lsof

WORKDIR /app
6 changes: 5 additions & 1 deletion test/test_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ set -e

if command -v python3; then
export PYTHON=python3
mkdir -p /usr/local/lib/python3.6/site-packages
VENV="${PYTHON} -m venv"
else
export PYTHON=python2
VENV="virtualenv"
fi;

${VENV} --system-site-packages ./venv
. ./venv/bin/activate

make install

make test
Expand Down

0 comments on commit 580e34a

Please sign in to comment.