diff --git a/bindep.txt b/bindep.txt index 09b46284..a27fb5d0 100644 --- a/bindep.txt +++ b/bindep.txt @@ -29,9 +29,6 @@ gcc git-core [platform:dpkg platform:suse] libssl-dev [platform:dpkg] libffi-dev [platform:dpkg] -python2.7 [platform:dpkg] -python-apt [platform:dpkg] -python-dev [platform:dpkg] python3 [platform:dpkg] python3-apt [platform:dpkg] python3-dev [platform:dpkg] @@ -41,13 +38,15 @@ gcc-c++ [platform:rpm] git [platform:rpm !platform:suse] libffi-devel [platform:rpm] openssl-devel [platform:rpm] -python-devel [platform:rpm] -python2-dnf [platform:fedora] +python3-dnf [platform:fedora] python3-devel [platform:rpm] # Base requirements for Gentoo git [platform:gentoo] # For SELinux -libselinux-python [platform:redhat] -libsemanage-python [platform:redhat] +libselinux-python3 [platform:redhat] +libsemanage-python3 [platform:redhat] + +# Required for compressing collected log files in CI +gzip diff --git a/get-ansible-role-requirements.yml b/get-ansible-role-requirements.yml index edb6014b..0509ad50 100644 --- a/get-ansible-role-requirements.yml +++ b/get-ansible-role-requirements.yml @@ -136,6 +136,7 @@ - item['scm'] == "git" or item['scm'] is undefined vars: + ansible_python_interpreter: "/usr/bin/python3" homedir: "{{ lookup('env', 'TESTING_HOME') }}" role_file: "{{ lookup('env', 'ANSIBLE_ROLE_REQUIREMENTS_PATH') }}" osa_roles: "{{ lookup('file', role_file) | from_yaml }}" diff --git a/run_tests_common.sh b/run_tests_common.sh index 3cccac3b..c8d29e4f 100755 --- a/run_tests_common.sh +++ b/run_tests_common.sh @@ -55,17 +55,17 @@ case "${ID,,}" in # tox later installing virtualenv as a dependancy with pip, and breaking later tests with # openstack_hosts which correctly install the python-virtualenv distro package [[ "${VERSION_ID}" == "7" ]] && extra_redhat_deps="python-virtualenv" - pkg_list="python-devel redhat-lsb-core yum-utils ${extra_redhat_deps:-}" + pkg_list="python3-devel redhat-lsb-core yum-utils ${extra_redhat_deps:-}" ;; fedora) - pkg_list="python-devel redhat-lsb-core redhat-rpm-config yum-utils" + pkg_list="python3-devel redhat-lsb-core redhat-rpm-config yum-utils" ;; ubuntu|debian) # NOTE(jrosser) remove this once infra debian images point to the upstream security repo if `/bin/grep -q "stretch" /etc/os-release` && [ -f "/etc/apt/sources.list.d/security.list" ]; then echo 'deb http://security.debian.org stretch/updates main contrib' | sudo tee /etc/apt/sources.list.d/security.list > /dev/null fi - pkg_list="python-dev lsb-release" + pkg_list="python3-dev lsb-release" sudo apt-get update ;; gentoo) @@ -80,16 +80,16 @@ esac eval sudo ${pkg_mgr_cmd} ${pkg_list} # Install pip -if ! which pip &>/dev/null; then +if ! which pip3 &>/dev/null; then curl --silent --show-error --retry 5 \ - https://bootstrap.pypa.io/3.3/get-pip.py | sudo python2.7 + https://bootstrap.pypa.io/3.3/get-pip.py | sudo python3 fi # Install bindep and tox if [[ "${ID,,}" == "centos" ]] && [[ ${VERSION_ID} == "7" ]]; then - sudo pip install 'bindep>=2.4.0' 'tox<=3.14.0' + sudo pip3 install 'bindep>=2.4.0' 'tox<=3.14.0' else - sudo pip install 'bindep>=2.4.0' tox + sudo pip3 install 'bindep>=2.4.0' tox fi if [[ "${ID,,}" == "fedora" ]]; then