[Distutils] enhancing .pypirc file for multiple servers handling

Tarek Ziadé ziade.tarek at gmail.com
Fri Dec 28 16:53:41 CET 2007


I have create a "iw.dist" package that implements two distutils commands:

- mregister
- mupload

They allow to register and upload packages on several PyPI-like servers,
with an ehnanced version
of .pypirc (compatible with the old version)

For example this .pypirc file adds a new server:


  host: http://localhost:8080/plone/psc 

And I can register/upload my egg both to the cheeseshop and to my local
PyPI-like server, like this:

  $ python setup.py mregister sdist mupload

Each command will ask at the prompt for each server if the user wants to
the call on it.

a prototype of iw.dist is available at the cheeseshop 


Tarek Ziadé wrote:
> Hello,
> I am implementing a PyPI-like server, to allow people using it as a
> cheeseshop alternative. 
> The .pypirc file that is used together with the register command is
> working just for one server and will not allow having several set of
> login/password. This can be a problem if you work with several servers.
> Furthermore, this command is using a hardcoded ‘pypi’ realm if you look at
> distutils/commands/register.py:
> auth.add_password('pypi', host, username, password)
> I think it could be enhanced in order to hold several login/password for
> each server, using the host url and the realm (the realm can be queried
> automatically too). Otherwise all servers have to fake a ‘pypi’ realm on
> 401 errors.
> I can work on a more formal document (some kind of PEP?) to explain the
> changes needed in the current implementation. I am also willing to spend
> the time needed to code it (I will code it anyway in a custom package but
> I think this belongs to distutils because it is intended, as far as i
> understand it, to work with any server)
> Regards
> Tarek

View this message in context: http://www.nabble.com/enhancing-.pypirc-file-for-multiple-servers-handling-tp14504516p14527503.html
Sent from the Python - distutils-sig mailing list archive at Nabble.com.

More information about the Distutils-SIG mailing list