enable setting python version for ensure-twine

Add twine_python so we can control the version of python used to
install twine.

Change-Id: I36ddbdf78f549ddc022cce86f3ada9631fb19c37
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-11-08 14:06:07 -05:00
parent ce5c415b25
commit 125eeed6fe
3 changed files with 11 additions and 1 deletions

View File

@ -1 +1,9 @@
Ensure twine is installed.
**Role Variables**
.. zuul:rolevar:: twine_python
:default: python
The python interpreter to use to install twine if it is not already
installed. Set it to "python3" to use python 3, for example.

View File

@ -0,0 +1,2 @@
---
twine_python: python

View File

@ -11,7 +11,7 @@
- name: Ensure twine is installed
block:
- name: Ensure twine is installed
command: pip install twine!=1.12.0 readme_renderer[md]!=23.0 --user
command: "{{ twine_python }} -m pip install twine!=1.12.0 readme_renderer[md]!=23.0 --user"
- name: Set pypi_twine_executable
set_fact: