-
- Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Originally reported by: bubla (Bitbucket: bubla, GitHub: bubla)
I have encountered the following case with setuptools installed using easy_install with the --user option (reason for the user installation: The system version was outdated).
The new setuptools provide their easy_install command and I have tried to install an egg to a given directory like this:
easy_install -d ~/test ../imreg_dft-0.6.0-py2.7.egg However, instead of complaining that the target directory is not in PYTHONPATH, it didn't even try to install it there and went directly to the user's Python directory, i.e. ~/Library/Python/2.7/lib/python/site-packages (that's on OSX).
After investigation, we have discovered that the initialize_options function in easy_install.py:150 sets the self.user property, although --user hasn't been passed on command-line.
Then, it most likely results in self.install_dir being silently overwritten on easy_install.py:276 (but we aren't sure since we are not familiar with the purelib and stuff).
Anyway, the --user and --install-dir arguments to easy_install are contradictory, so setting user internally especially if install-dir has been set by the user looks like bug.
I propose not doing this if potentially conflicting arguments have been supplied. If this is too much, then this behavior should be documented and user should be clearly warned that his request is going to be ignored.