Re: Passing user and password to easy_install
Luigi Paioro <[email protected]> Mon, 12 Apr 2010 18:23:44 +0200
| Newsgroups | gmane.comp.python.peak |
|---|---|
| Organization | INAF - IASF Milano |
| Message-ID | <[email protected]> |
>> 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. Yes, indeed. >> 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. The example code I attached was just to help me explaining what I meant. Certainly your solution is more suited and would be a very nice new feature. Luigi