Re: Passing user and password to easy_install
"P.J. Eby" <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]> Wed, 07 Apr 2010 13:12:58 -0400
| Newsgroups | gmane.comp.python.peak |
|---|---|
| Message-ID | <[email protected]> |
At 05:23 PM 4/7/2010 +0200, Luigi Paioro wrote: >Dear PEAKers, > >I'm using setuptool module to pack my software and I'd like to >distribute it via PyPI, making it installable exploiting easy_install. > >I have a requirement, though, that I'm not sure is supported by setuptools: > >My software must be distributed to >registered/authenticated/authorised users only. > >Well, registering the packages I might specify that the download URL >is a CGI, optionally with Basic Authentication accepting a default >user and password as described here: > >http://peak.telecommunity.com/DevCenter/EasyInstall#id17 > >This would provides me with the possibility of tracking the number >of downloads, but always with a single public user/password. But I >need to know who is downloading my packages. > >Is there a way to associate a user and password to easy_install >command? Such data would be nice if passed as Basic Authentication >data to the download URL... As described in the docs above, just have your users do "easy_install -f http://their_userid:[email protected]/some_path/", where /some_path/ is a web-served directory containing your packages. They can put this in their configuration file so they don't have to type it every time. (What you *can't* do, is put this on the Python Package index and still have it require logins for download. But, since the user needs to register with you anyway, supporting automated install from PyPI doesn't sound very useful in that case.)