Skip to content

Commit

Permalink
Fix CentOS 7 / RHEL 7 pbench-agent installations
Browse files Browse the repository at this point in the history
It looks like we need the latest version of `pip` to install all of
the module dependencies we have.  For all but CentOS 7 / RHEL 7 we
have the correct version.  So for those environments we now have to
install the latest version of `pip` directly in order for us to have
our Python3 dependencies satisfied.

The days of RHEL 7 are numbered.

Fixes distributed-system-analysis#2245.
  • Loading branch information
portante committed Apr 26, 2021
1 parent 74ec530 commit 54653f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions agent/rpm/pbench-agent.spec.j2
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ cp -a agent/* %{?buildroot}/%{installdir}/
if pip3 show configtools > /dev/null 2>&1 ;then pip3 uninstall -y configtools ;fi

%post
%if 0%{?rhel} == 7
curl -X GET -o /%{installdir}/get-pip.py https://bootstrap.pypa.io/get-pip.py > /%{installdir}/pip3-update.log 2>&1
python3 /%{installdir}/get-pip.py --prefix=/%{installdir} >> /%{installdir}/pip3-update.log 2>&1
export PYTHONPATH=/%{installdir}/lib/python3.6/site-packages:${PYTHONPATH}
export PATH=/%{installdir}/bin:${PATH}
%endif
# Install python dependencies
pip3 --no-cache-dir install --prefix=/%{installdir} -r /%{installdir}/requirements.txt > /%{installdir}/pip3-install.log

Expand Down

0 comments on commit 54653f8

Please sign in to comment.