Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Honoring TWINE_ environment variables #154

Open
ndejong opened this issue Sep 23, 2024 · 1 comment
Open

Honoring TWINE_ environment variables #154

ndejong opened this issue Sep 23, 2024 · 1 comment

Comments

@ndejong
Copy link

ndejong commented Sep 23, 2024

Currently the slap-cli publish sub-command does not honor the TWINE_* environment variables where-as twine-cli utility does -
https://twine.readthedocs.io/en/stable/index.html#configuration

Twine supports the following - TWINE_USERNAME, TWINE_PASSWORD, TWINE_REPOSITORY, TWINE_REPOSITORY_URL, TWINE_CERT, TWINE_NON_INTERACTIVE

These all map to options that are set with Cleo based options in src/slap/ext/application/publish.py that currently get passed through to Twine from slap-cli.

I'd propose simply recrafting all the respective options with something like below as appropriate for each -

option("username", "u", flag=False, default=os.getenv("TWINE_USERNAME", None))

For reference Cleo option.py looks like it should be okay with this.

Seems like a pretty simple thing, but before I charge right in and submit a PR, is this something that sounds about right to you?

@ndejong
Copy link
Author

ndejong commented Sep 25, 2024

Adding comment -

This matters because it enables the ability to use slap publish without needing to keep a ~/.pypirc file laying around with credentials in it.

It would enable the ability to just load the TWINE_ env-vars when a publish action is desired.

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

No branches or pull requests

1 participant