diff --git a/playbooks/python/sdist.yaml b/playbooks/python/sdist.yaml new file mode 100644 index 000000000..f157dea3f --- /dev/null +++ b/playbooks/python/sdist.yaml @@ -0,0 +1,3 @@ +- hosts: all + roles: + - build-python-sdist diff --git a/roles/build-python-sdist/defaults/main.yaml b/roles/build-python-sdist/defaults/main.yaml new file mode 100644 index 000000000..484656152 --- /dev/null +++ b/roles/build-python-sdist/defaults/main.yaml @@ -0,0 +1 @@ +python_sdist_chdir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/build-python-sdist/tasks/main.yaml b/roles/build-python-sdist/tasks/main.yaml new file mode 100644 index 000000000..c428ac15e --- /dev/null +++ b/roles/build-python-sdist/tasks/main.yaml @@ -0,0 +1,4 @@ +- name: Build a tarball and wheel + command: python setup.py sdist bdist_wheel + args: + chdir: "{{ python_sdist_chdir }}" diff --git a/zuul.yaml b/zuul.yaml index 52f2d7e20..b6ff80364 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -117,6 +117,13 @@ vars: tox_envlist: cover +- job: + name: python-sdist + description: | + Build a source tarball and wheel for uploading + run: playbooks/python/sdist.yaml + post-run: playbooks/python/tarball-post + - job: name: tox-tarball parent: tox