Re: Passing user and password to easy_install
"P.J. Eby" <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]> Fri, 09 Apr 2010 11:24:13 -0400
| Newsgroups | gmane.comp.python.peak |
|---|---|
| Message-ID | <[email protected]> |
At 10:29 AM 4/9/2010 +0200, Luigi Paioro wrote: >what I'd like to have is the possibility to avoid asking the user to >explicitly refer to a specific repository address (it might be >provided with an easy_install configuration file, for example), and >in particular I would avoid to put clearly the user name and the >password in the command line. Then right now, you'll need to put them in the configuration file. >Poking around setuptools code, I stumbled on the routine where the >actual package downloading is performed, and thus I tried to modify >the code in order to introduce something that might meet my needs. >In attachment you find a package_index.py patch file with very few >lines giving me all I need. It is just a testing code, not really clean, Currently, easy_install is not designed to be user-interactive, and a "not really clean testing code" is not a suitable way to change that. In particular, other programs reuse easy_install's code and are not expecting it to prompt for user input. At minimum, there would need to be a command-line option used to enable interactivity, and the default behavior would need to be to respond to 401 with output telling the user that they need to enable interactivity to get a password prompt.