diff --git a/roles/build-python-release/README.rst b/roles/build-python-release/README.rst index 3a2981c3b..452e197a8 100644 --- a/roles/build-python-release/README.rst +++ b/roles/build-python-release/README.rst @@ -7,3 +7,9 @@ Build sdist and wheel for Python projects. The python interpreter to use. Set it to "python3" to use python 3, for example. + +.. zuul:rolevar:: bdist_wheel_xargs + :default: '' + + Extra arguments to pass to the bdist_wheel command when building + packages. diff --git a/roles/build-python-release/defaults/main.yaml b/roles/build-python-release/defaults/main.yaml index 10203cd5f..9edcde0bc 100644 --- a/roles/build-python-release/defaults/main.yaml +++ b/roles/build-python-release/defaults/main.yaml @@ -1,2 +1,3 @@ zuul_work_dir: "{{ zuul.project.src_dir }}" release_python: "python" +bdist_wheel_xargs: "" diff --git a/roles/build-python-release/tasks/main.yaml b/roles/build-python-release/tasks/main.yaml index bd56cf798..fe8369e56 100644 --- a/roles/build-python-release/tasks/main.yaml +++ b/roles/build-python-release/tasks/main.yaml @@ -1,4 +1,4 @@ - 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: chdir: "{{ zuul_work_dir }}"