Correctly use pip3 to setup a wheel cache for python3 packages on linux

Previously pip was used (instead of pip3) which caused that python2
packages were installed into the python3 wheel cache folder. Some of
the packages also worked for python3, but not all of them.

Task-number: AUTOSUITE-195
Change-Id: I393d036667b14e11dee65975ba6933e7174d0e9d
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
This commit is contained in:
Dominik Holland
2018-08-29 14:49:39 +02:00
committed by Liang Qi
parent db7391647f
commit 7fe274f6f6
3 changed files with 4 additions and 3 deletions

View File

@@ -108,8 +108,9 @@ sudo ln -s /opt/rh/rh-python36/root/usr/bin/pip3 /usr/local/bin/pip3
sudo pip install --upgrade pip
sudo pip install virtualenv wheel
sudo /usr/local/bin/pip3 install wheel
# Install all needed packages in a special wheel cache directory
pip wheel --wheel-dir $HOME/python3-wheels -r ${BASH_SOURCE%/*}/../common/shared/requirements.txt
/usr/local/bin/pip3 wheel --wheel-dir $HOME/python3-wheels -r ${BASH_SOURCE%/*}/../common/shared/requirements.txt
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
SetEnvVar "PYTHON3_WHEEL_CACHE" "$HOME/python3-wheels"

View File

@@ -167,7 +167,7 @@ echo "Installing packages"
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y install "${installPackages[@]}"
# Install all needed packages in a special wheel cache directory
pip wheel --wheel-dir $HOME/python3-wheels -r ${BASH_SOURCE%/*}/../common/shared/requirements.txt
pip3 wheel --wheel-dir $HOME/python3-wheels -r ${BASH_SOURCE%/*}/../common/shared/requirements.txt
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
SetEnvVar "PYTHON3_WHEEL_CACHE" "$HOME/python3-wheels"

View File

@@ -12,7 +12,7 @@ sudo pkcon -y install python-devel python-virtualenv
sudo pkcon -y install libpython3_4m1_0 python3-base python3 python3-pip python3-devel python3-virtualenv python3-wheel
# Install all needed packages in a special wheel cache directory
pip wheel --wheel-dir $HOME/python3-wheels -r ${BASH_SOURCE%/*}/../common/shared/requirements.txt
pip3 wheel --wheel-dir $HOME/python3-wheels -r ${BASH_SOURCE%/*}/../common/shared/requirements.txt
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
SetEnvVar "PYTHON3_WHEEL_CACHE" "$HOME/python3-wheels"