Skip to content

Pass TWINE_REPOSITORY_URL envvar#666

Merged
abravalheri merged 1 commit into
pyscaffold:masterfrom
baurmatt:twine-repository-url
Sep 20, 2022
Merged

Pass TWINE_REPOSITORY_URL envvar#666
abravalheri merged 1 commit into
pyscaffold:masterfrom
baurmatt:twine-repository-url

Conversation

@baurmatt

Copy link
Copy Markdown
Contributor

Purpose

Currently running the following commands leads to an error:

TWINE_REPOSITORY=gitlab TWINE_REPOSITORY_URL="https://gitlab.example.org/api/v4/projects/1111/packages/pypi" TWINE_USERNAME=gitlab-ci-token TWINE_PASSWORD=$TOKEN tox -e publish
...
publish run-test: commands[1] | python -m twine upload --repository gitlab 'dist/*'
ERROR    InvalidConfiguration: Missing 'gitlab' section from ~/.pypirc.
         More info: https://packaging.python.org/specifications/pypirc/
ERROR: InvocationError for command /Users/mbaur/Sources/s3-backupper/.tox/publish/bin/python -m twine upload --repository gitlab 'dist/*' (exited with code 1)
______________________________________________________________________________________ summary ______________________________________________________________________________________
ERROR:   publish: commands failed

This is because the Twine Repository URL configuration never reaches the command execution.

Approach

Pass TWINE_REPOSITORY_URL through.

Open Questions and Pre-Merge TODOs

  • Use github checklists. When solved, check the box and explain the answer.

Resources & Links

Links to blog posts, patterns, libraries or addons used to solve this problem

This is needed to allow configuration of (self-hosted?) Gitlab
repositories.
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.5%) to 97.293% when pulling afcb469 on baurmatt:twine-repository-url into 96ceb97 on pyscaffold:master.

@FlorianWilhelm

Copy link
Copy Markdown
Member

Thanks @baurmatt. What do you think @abravalheri? LGTM.

@abravalheri

Copy link
Copy Markdown
Collaborator

Sorry for the delay. This PR works very well for PyScaffold, thank you very much @baurmatt.

@abravalheri abravalheri merged commit 5dcee4e into pyscaffold:master Sep 20, 2022
@abravalheri

Copy link
Copy Markdown
Collaborator

Hi @baurmatt, shortly the new release should be available on PyPI: v4.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants