enhancing .pypirc file for multiple servers handling
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-t... Sent from the Python - distutils-sig mailing list archive at Nabble.com.
Hello, 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: [server-login] username:tarek password:secret [local-psc] host: http://localhost:8080/plone/psc username:admin password:admin 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 perform the call on it. a prototype of iw.dist is available at the cheeseshop ++ Tarek 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-t... Sent from the Python - distutils-sig mailing list archive at Nabble.com.
participants (1)
-
Tarek Ziadé