It makes yum and pip installs work with py3 packages. The package manager
dnf/yum and pip binary are determined at run time from the OS.
Use dnf-plugins-core for dnf with respect to
yum-plugin-priorities.
Use pipefail with set -ex to fix linter errors.
Change-Id: I997509204e30abb8b21ef936ea44440fbaa5a0e4
Closes-Bug: #1813546