zuul-jobs/roles/upload-pypi/templates/.pypirc.j2
Ian Wienand 2c58a8ceed upload-pypi: support API token upload
Support an api_token argument.  Accounts that have two-factor auth
will at some point require using API tokens to upload.

Change-Id: Id0c47d088d6e8febbae3c96caecc81ebe247754e
2022-07-13 15:18:08 +10:00

11 lines
336 B
Django/Jinja

[distutils]
index-servers=
{{ pypi_repository }}
[{{ pypi_repository }}]
{% if pypi_repository_url %}
repository:{{ pypi_repository_url }}
{% endif %}
username:{{ '__token__' if (pypi_info.api_token is defined) else pypi_info.username }}
password:{{ pypi_info.api_token if (pypi_info.api_token is defined) else pypi_info.password }}