zestsoftware / zest.releaser

Python software releasing made easy and repeatable
https://zestreleaser.readthedocs.io
GNU General Public License v2.0
198 stars 62 forks source link

353 - Add support for Twine environment variables #354

Closed mctwynne closed 4 years ago

mctwynne commented 4 years ago

Twine supports a number of environment variables which can be used to override settings in setup.cfg and pypirc. Using the TWINE_REPOSITORY and TWINE_REPOSITORY_URL environment variables can now be used to override the desired index server and/or URL that packages wil be uploaded to.

mctwynne commented 4 years ago

@mauritsvanrees I'm getting SyntaxErrors in the 2.7 and pypy CI jobs, but they don't seem to be related to my change. Is this something you've seen before, or do you happen to know what I've broken? Thanks!

mauritsvanrees commented 4 years ago

On Python 2.7 we are getting a too new check-manifest which only works on Python 2.7. Locally I actually get much more errors when I try to run the buildout on 2.7. I will have a look.

mauritsvanrees commented 4 years ago

My other PR is merged, so if you rebase your branch on master (or merge master), Travis should be fixed.

mctwynne commented 4 years ago

@mauritsvanrees I've updated the Twine command logic. Rebasing fixed the Travis issues. Thanks for fixing that!

I'd love to have some tests for this, but I'm not exactly sure how (or if it even makes sense) to include mocks in the doctests. Mocks are also incompatible with 2.7 from what I can tell (?), which is unfortunate. Actually setting environment variables in the tests is also not a great idea. Any thoughts on this?

mctwynne commented 4 years ago

@mauritsvanrees Thanks for accepting this change! Glad to hear it's working for you :)