From ffe4f4fea53a718148622e6698a9dd15a5fd3e93 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 13 Jul 2022 11:56:02 +1000 Subject: [PATCH] ensure-twine: make python3 default, ensure pip installed Make the default twine python installation use "python3". Use the ensure-pip role before calling pip. This role currently isn't tested; it is added with upload-pypi testing in the follow-on Ie40ec32b3b2ffc4646301c6e145c527fe6a3bae2 Change-Id: I55ef79bf9c5af9e4d1da24ed654821277edb663b --- roles/ensure-twine/defaults/main.yaml | 2 +- roles/ensure-twine/tasks/main.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/ensure-twine/defaults/main.yaml b/roles/ensure-twine/defaults/main.yaml index 5ae3871b7..6c1ecf3a5 100644 --- a/roles/ensure-twine/defaults/main.yaml +++ b/roles/ensure-twine/defaults/main.yaml @@ -1,3 +1,3 @@ --- -twine_python: python +twine_python: python3 twine_executable: twine diff --git a/roles/ensure-twine/tasks/main.yaml b/roles/ensure-twine/tasks/main.yaml index 40789cc15..b192972b2 100644 --- a/roles/ensure-twine/tasks/main.yaml +++ b/roles/ensure-twine/tasks/main.yaml @@ -13,6 +13,10 @@ - name: Ensure twine is installed block: + - name: Ensure pip + include_role: + name: ensure-pip + - name: Ensure twine is installed command: "{{ twine_python }} -m pip install twine!=1.12.0 requests-toolbelt!=0.9.0 --user"