use_setuptools() tries to patch the globally installed setuptools

Create issue
Issue #74 resolved
Daniel Stutzbach created an issue

Debian with Python 2.6. Setuptools 0.6c9 is installed in site-packages. I'm running a package's file that begins with the following:

{{{ #!python import distribute_setup distribute_setup.use_setuptools() }}}

The use_setuptools() function detects that setuptools is installed and attempts to patch it. This is not a nice thing for use_setuptools() to do, since the user is not trying to install distribute, they are just trying to install some other package that happens to make use of distribute for installation purposes. It especially should not be necessary for non-root activities such as "python test".

{{{ #!python

otto:~/src/blist$ python2.6 test Scanning installed packages Setuptools installation detected at /usr/local/stow/Python-2.6.3/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg Egg installation Patching... Renaming /usr/local/stow/Python-2.6.3/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg into /usr/local/stow/Python-2.6.3/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg.OLD.1255837298.17 Creating /home/agthorr/src/blist/setuptools-0.6c9-py2.6.egg-info Creating /home/agthorr/src/blist/setuptools.pth Traceback (most recent call last): File "", line 5, in <module> distribute_setup.use_setuptools() File "/home/agthorr/src/blist/", line 138, in use_setuptools fake_setuptools() File "/home/agthorr/src/blist/", line 389, in fake_setuptools res = _patch_egg_dir(setuptools_location) File "/home/agthorr/src/blist/", line 309, in _patch_egg_dir _rename_path(path) File "/home/agthorr/src/blist/", line 234, in _rename_path os.rename(path, new_name) OSError: [Errno 13] Permission denied


Comments (1)

  1. Log in to comment