[Distutils] More control over uploading an sdist and egg to PyPI.
Nick Coghlan
ncoghlan at gmail.com
Sat Dec 7 09:22:21 CET 2013
On 7 December 2013 11:50, Kannan Goundan <kannan at cakoose.com> wrote:
> We use setuptools for our library. I'm trying to figure out a way to upload
> an sdist and an egg to PyPI without having to put my PyPI credentials in a
> file. Please let me know if this is not the right mailing list for this
> question.
>
> Our setup is that the entire team has access to the source code repository,
> but only the release managers have access to the credentials needed to make
> releases to PyPI (they're in a "fake" home directory). To do a release, you
> run:
>
> cd project-dir
> HOME="/release-manager-secrets/fake-pypi-home-dir" \
> python setup.py bdist_egg sdist upload
>
> This works ok, but we would prefer to not have our PyPI credentials on the
> filesystem (unencrypted) at all. I'd like to run "setup.py bdist_egg sdist"
> first and then run a separate command that uploaded the egg and sdist. This
> command would ask for my credentials on stdin.
>
> How can I write such a program? Is there a PyPI HTTP API I can use? Does
> setuptools have a public interface that I can call?
Hi Kanaan,
I believe twine (https://pypi.python.org/pypi/twine/) should work as
the independent upload utility that you're looking for.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Distutils-SIG
mailing list