diff --git a/jobs/swh-packages.yaml b/jobs/swh-packages.yaml --- a/jobs/swh-packages.yaml +++ b/jobs/swh-packages.yaml @@ -197,6 +197,7 @@ name: DOPH display-name: swh-perfecthash repo_name: swh-perfecthash + include_bdist: false pkg: perfecthash python_module: swh.perfecthash jobs: diff --git a/jobs/templates/swh-pypi.groovy.j2 b/jobs/templates/swh-pypi.groovy.j2 --- a/jobs/templates/swh-pypi.groovy.j2 +++ b/jobs/templates/swh-pypi.groovy.j2 @@ -11,6 +11,12 @@ break } +def BDIST_WHEEL = 'bdist_wheel' + +if (!params.INCLUDE_BDIST) { + BDIST_WHEEL = '' +} + pipeline { {% filter indent(width=2) %} {%- include 'includes/agent-docker.groovy.j2' -%} @@ -64,7 +70,7 @@ done fi - python3 setup.py sdist bdist_wheel + python3 setup.py sdist ${BDIST_WHEEL} ''' archiveArtifacts allowEmptyArchive: true, artifacts: 'dist/*', diff --git a/jobs/templates/swh-pypi.yaml b/jobs/templates/swh-pypi.yaml --- a/jobs/templates/swh-pypi.yaml +++ b/jobs/templates/swh-pypi.yaml @@ -2,6 +2,7 @@ name: "{name}/pypi-upload" display-name: "Upload to PyPI" docker_image: tox + include_bdist: true project-type: pipeline sandbox: true properties: @@ -42,5 +43,10 @@ default: false description: | Proceed even if the tests are failing on the repository. + - bool: + name: INCLUDE_BDIST + default: '{include_bdist}' + description: | + Include a binary distribution in the PyPI upload. dsl: !include-jinja2: swh-pypi.groovy.j2