Make setuptools RPM installation optional

After merging https://review.openstack.org/#/c/614762 python setuptool
RPM is installed, this is forbidden at Fedora 28, it has a exclusion
directive at dnf.conf.

Now that we hava a cool mechanism to check presence of python modules
before install stuff, we can integrate it with setuptools too.

Story: https://tree.taiga.io/project/tripleo-ci-board/task/316?kanban-status=1447275

Change-Id: I480a5efebb200e65f20ef40456162136be905d55
This commit is contained in:
Quique Llorente 2018-11-05 08:40:34 +01:00 committed by Sorin Sbarnea
parent 198bef9129
commit ad94c8b1d2
1 changed files with 5 additions and 2 deletions

View File

@ -119,12 +119,12 @@ install_deps () {
if [ "$(python_cmd)" == "python3" ]; then
PYTHON_PACKAGES+=("python3-libselinux")
PYTHON_PACKAGES+=("python3-PyYAML")
PYTHON_PACKAGES+=("python3-setuptools")
SETUPTOOLS_PACKAGE=python3-setuptools
VIRTUALENV_PACKAGE=python3-virtualenv
PIP_PACKAGE=python3-pip
else
PYTHON_PACKAGES+=("libselinux-python")
PYTHON_PACKAGES+=("python-setuptools")
SETUPTOOLS_PACKAGE=python-setuptools
VIRTUALENV_PACKAGE=python-virtualenv
PIP_PACKAGE=python-pip
fi
@ -132,6 +132,9 @@ install_deps () {
check_python_module virtualenv &> /dev/null || \
PYTHON_PACKAGES+=($VIRTUALENV_PACKAGE)
check_python_module setuptools &> /dev/null || \
PYTHON_PACKAGES+=($SETUPTOOLS_PACKAGE)
sudo $(package_manager) install -y \
/usr/bin/git \
gcc \