Merge "build-python-release: Add flag for whether to build a wheel or not"

This commit is contained in:
Zuul 2021-10-20 20:32:00 +00:00 committed by Gerrit Code Review
commit 984147663c
3 changed files with 12 additions and 0 deletions

View File

@ -8,6 +8,11 @@ Build sdist and wheel for Python projects.
The python interpreter to use. Set it to "python3" to use python 3,
for example.
.. zuul:rolevar:: build_wheel
:default: true
Whether to build a wheel. Set to false to just build an sdist tarball.
.. zuul:rolevar:: bdist_wheel_xargs
:default: ''

View File

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

View File

@ -2,3 +2,9 @@
command: "{{ release_python }} setup.py sdist bdist_wheel {{ bdist_wheel_xargs }}"
args:
chdir: "{{ zuul_work_dir }}"
when: build_wheel
- name: Just build a tarball
command: "{{ release_python }} setup.py sdist"
args:
chdir: "{{ zuul_work_dir }}"
when: not build_wheel