Merge "build-python-release: pyproject-build by default"
This commit is contained in:
commit
80e9153564
@ -2,19 +2,25 @@ Build sdist and wheel for Python projects.
|
|||||||
|
|
||||||
**Role Variables**
|
**Role Variables**
|
||||||
|
|
||||||
.. zuul:rolevar:: release_python
|
|
||||||
:default: python
|
|
||||||
|
|
||||||
The python interpreter to use. Set it to "python3" to use python 3,
|
|
||||||
for example.
|
|
||||||
|
|
||||||
.. zuul:rolevar:: build_wheel
|
.. zuul:rolevar:: build_wheel
|
||||||
:default: true
|
:default: true
|
||||||
|
|
||||||
Whether to build a wheel. Set to false to just build an sdist tarball.
|
Whether to build a wheel. Set to false to just build an sdist tarball.
|
||||||
|
|
||||||
|
.. zuul:rolevar:: legacy_setup
|
||||||
|
:default: false
|
||||||
|
|
||||||
|
By default, the role uses pyproject-build. Set this to true if you need
|
||||||
|
to use old-style direct invocation of setup.py instead.
|
||||||
|
|
||||||
|
.. zuul:rolevar:: release_python
|
||||||
|
:default: python
|
||||||
|
|
||||||
|
The python interpreter to use. Set it to "python3" to use python 3,
|
||||||
|
for example. Only relevant when legacy_setup is enabled.
|
||||||
|
|
||||||
.. zuul:rolevar:: bdist_wheel_xargs
|
.. zuul:rolevar:: bdist_wheel_xargs
|
||||||
:default: ''
|
:default: ''
|
||||||
|
|
||||||
Extra arguments to pass to the bdist_wheel command when building
|
Extra arguments to pass to the bdist_wheel command when building
|
||||||
packages.
|
packages. Only relevant when legacy_setup is enabled.
|
||||||
|
@ -2,3 +2,4 @@ zuul_work_dir: "{{ zuul.project.src_dir }}"
|
|||||||
release_python: "python"
|
release_python: "python"
|
||||||
bdist_wheel_xargs: ""
|
bdist_wheel_xargs: ""
|
||||||
build_wheel: true
|
build_wheel: true
|
||||||
|
legacy_setup: false
|
||||||
|
@ -1,10 +1,32 @@
|
|||||||
- name: Build a tarball and wheel
|
- name: Build sdist and wheel with setup.py
|
||||||
command: "{{ release_python }} setup.py sdist bdist_wheel {{ bdist_wheel_xargs }}"
|
when: legacy_setup
|
||||||
args:
|
block:
|
||||||
chdir: "{{ zuul_work_dir }}"
|
|
||||||
when: build_wheel
|
- name: Build a tarball and wheel
|
||||||
- name: Just build a tarball
|
command: "{{ release_python }} setup.py sdist bdist_wheel {{ bdist_wheel_xargs }}"
|
||||||
command: "{{ release_python }} setup.py sdist"
|
args:
|
||||||
args:
|
chdir: "{{ zuul_work_dir }}"
|
||||||
chdir: "{{ zuul_work_dir }}"
|
when: build_wheel
|
||||||
when: not build_wheel
|
- name: Just build a tarball
|
||||||
|
command: "{{ release_python }} setup.py sdist"
|
||||||
|
args:
|
||||||
|
chdir: "{{ zuul_work_dir }}"
|
||||||
|
when: not build_wheel
|
||||||
|
|
||||||
|
- name: Build sdist and wheel with pyproject-build
|
||||||
|
when: not legacy_setup
|
||||||
|
block:
|
||||||
|
|
||||||
|
- name: Make sure pyproject-build is available
|
||||||
|
include_role:
|
||||||
|
name: ensure-pyproject-build
|
||||||
|
- name: Build a tarball and wheel
|
||||||
|
command: "{{ ensure_pyproject_build_executable }}"
|
||||||
|
args:
|
||||||
|
chdir: "{{ zuul_work_dir }}"
|
||||||
|
when: build_wheel
|
||||||
|
- name: Just build a tarball
|
||||||
|
command: "{{ ensure_pyproject_build_executable }} --sdist"
|
||||||
|
args:
|
||||||
|
chdir: "{{ zuul_work_dir }}"
|
||||||
|
when: not build_wheel
|
||||||
|
Loading…
x
Reference in New Issue
Block a user