allow build-python-release consumers to override python version

Define a release_python variable that users of the
build-python-release role can override to set which version of python
they are using for building sdists and wheels.

Change-Id: I1502c572304000fab45a43e1a6d674f5aa7e9a9e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-11 14:10:50 -04:00
parent b37b49e2bc
commit be339b7746
3 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,9 @@
Build sdist and wheel for Python projects.
** Role Variables **
.. zuul:rolevar:: release_python
:default: python
The python interpreter to use. Set it to "python3" to use python 3,
for example.

View File

@ -1 +1,2 @@
zuul_work_dir: "{{ zuul.project.src_dir }}"
release_python: "python"

View File

@ -1,4 +1,4 @@
- name: Build a tarball and wheel
command: python setup.py sdist bdist_wheel
command: "{{release_python}} setup.py sdist bdist_wheel"
args:
chdir: "{{ zuul_work_dir }}"