Upgrade pip/setuptools/wheel in role test venv
In the integrated build, the repo build process upgrades
pip/setuptools/wheel in the venv to our preferred pinned
version, but the role tests using developer mode does not.
Gnocchi, since 4.3.0 [1] requires setuptools > 30.3.0 -
but CentOS only has 28.8.0 when it builds the venv, so the
package install fails.
In this patch we create the venv, then upgrade pip,
setuptools and wheel, then install the keystone packages.
Doing this for all roles is impractical, but it will be
necessary to unblock patches from merging into this role
today. In the future when we use the python_venv_build role
we can do all this there instead of repeating this patch
across all the roles.
[1] 3f8a22a51b
Change-Id: Ibb5a068350b30f0d74ef26a55528527bd9e646a3
This commit is contained in:
parent
fd19574928
commit
ca0211a08b
|
@ -72,23 +72,47 @@
|
|||
- Restart gnocchi services
|
||||
- Restart web server
|
||||
|
||||
- name: Install pip packages
|
||||
pip:
|
||||
name: "{{ gnocchi_pip_packages }}"
|
||||
state: "{{ gnocchi_pip_package_state }}"
|
||||
virtualenv: "{{ gnocchi_bin | dirname }}"
|
||||
virtualenv_site_packages: "no"
|
||||
extra_args: >-
|
||||
{{ gnocchi_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
|
||||
{{ pip_install_options | default('') }}
|
||||
register: install_packages
|
||||
until: install_packages is success
|
||||
retries: 5
|
||||
delay: 2
|
||||
- name: Create the python venv and install packages into it
|
||||
when: gnocchi_get_venv | failed or gnocchi_get_venv | skipped
|
||||
notify:
|
||||
- Restart gnocchi services
|
||||
- Restart web server
|
||||
block:
|
||||
- name: Create the virtualenv (if it does not exist)
|
||||
command: "virtualenv --never-download --no-site-packages {{ gnocchi_bin | dirname }}"
|
||||
args:
|
||||
creates: "{{ gnocchi_bin }}/activate"
|
||||
|
||||
- name: Upgrade pip/setuptools/wheel to the versions we want
|
||||
pip:
|
||||
name:
|
||||
- pip
|
||||
- setuptools
|
||||
- wheel
|
||||
state: "{{ gnocchi_pip_package_state }}"
|
||||
virtualenv: "{{ gnocchi_bin | dirname }}"
|
||||
virtualenv_site_packages: "no"
|
||||
extra_args: >-
|
||||
{{ gnocchi_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
|
||||
{{ pip_install_options | default('') }}
|
||||
register: install_packages
|
||||
until: install_packages is success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: Install pip packages
|
||||
pip:
|
||||
name: "{{ gnocchi_pip_packages }}"
|
||||
state: "{{ gnocchi_pip_package_state }}"
|
||||
virtualenv: "{{ gnocchi_bin | dirname }}"
|
||||
virtualenv_site_packages: "no"
|
||||
extra_args: >-
|
||||
{{ gnocchi_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
|
||||
{{ pip_install_options | default('') }}
|
||||
register: install_packages
|
||||
until: install_packages is success
|
||||
retries: 5
|
||||
delay: 2
|
||||
notify:
|
||||
- Restart gnocchi services
|
||||
- Restart web server
|
||||
|
||||
- name: Remove python from path first (CentOS, openSUSE)
|
||||
file:
|
||||
|
|
Loading…
Reference in New Issue