support passing extra arguments to bdist_wheel in build-python-release

Users of this role may want to pass extra arguments, such as the
--universal flag. Those arguments need to come after the bdist_wheel
argument to setup.py so that the command line processor understands them.

Change-Id: I38a3ef28b2c78821ec81a3f1adf0cfeef946d98f
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-10-04 06:55:23 -04:00
parent a327047c14
commit 836cc85eec
3 changed files with 8 additions and 1 deletions

View File

@ -7,3 +7,9 @@ Build sdist and wheel for Python projects.
The python interpreter to use. Set it to "python3" to use python 3, The python interpreter to use. Set it to "python3" to use python 3,
for example. for example.
.. zuul:rolevar:: bdist_wheel_xargs
:default: ''
Extra arguments to pass to the bdist_wheel command when building
packages.

View File

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

View File

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