-
Notifications
You must be signed in to change notification settings - Fork 308
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
Suggestion: add an env-var to define --config-file default location/value #559
Comments
This seems reasonable, given the other That said:
Can you elaborate on this? Do you have links to any docs/discussions that suggest this? What distinguishes the individual files? |
I've been working on F/OSS Python with CI for close to a decade and I've never heard of this. I'm also not fond of providing invisible ways of swapping out where someone might be uploading to. CI configuration can be confusing enough that I'd be willing to bet as soon as someone starts using this they'll upload a private, proprietary package to public PyPI and freak out at us for letting them shoot themselves in the foot. |
Containers are changing quite a lot of practices in recent years as they provide new ways to solve old problems. Having our CI run using Jenkins and the Kubernetes plugin it makes sense for us to have
I can understand that and even relate with it. Perhaps a better suggestion is to have a |
@iMoses Out of curiosity, why aren't the existing environment variables sufficient? https://twine.readthedocs.io/en/latest/#environment-variables |
@bhrutledge technically they could be enough, as each deployment only requires a single set of username, password and repository. It's just easier and better organized in my opinion when we have all the configuration in a single Currently my usage looks something like this:
|
Possibly related: #349 and #350. The comments there reminded me that .pypirc is not exclusive to Twine, so changes on where it's sourced from should be considered as part of the larger packaging ecosystem. In practice, I think that means it's not going to change in the near future. Also, a quick scan of tools like pip, tox, and pytest didn't yield an obvious environment variable for setting the configuration file. Rather, they seem to support using environment variables for setting individual configuration options (as Twine does). With all that in mind, I'm going to close this for now, but if folks feel strongly, we can reopen it. |
Other tools have this such as npm, maven etc. Would be very useful for CI/CD with a TWINE_CONFIG_FILE environment variable that can be used globally instead of the |
When running in CI, which is a standard use case for twine, it is often considered best practice to use a separate
.pypirc
file per job meaning that the--config-file
cli arg is used a lot.It would be nice to have an env-var such as
TWINE_CONFIG_FILE
to set the default for that globally, thus changing the default requirement for.pypirc
to be at the home directory.What says you, yay or nay? :)
The text was updated successfully, but these errors were encountered: