1. Tarek Ziadé
  2. distribute
  3. Issues
Issue #174 resolved

edit mode does not work for setuptools

David Cournapeau
created an issue

The following does not work on ubuntu lucid (fresh install, no PYTHONPATH nor any distutils configuration):

easy_install -eNb mydir setuptools

raises:

Searching for distribute Best match: distribute 0.6.10 Installing easy_install script to /usr/local/bin error: /usr/local/bin/easy_install: Permission denied

If I use a virtualenv:

virtualenv tmp source tmp/bin/activate easy_install -eNb mydir setuptools

It works ok. Note that if you replace setuptools by distribute, you get the exact same issue.

Comments (7)

  1. Tarek Ziadé repo owner

    It works with virtualenv by luck: it will create the script in its bin directory.

    the editable mode should not create the scripts, so there's a missing check in install_egg_scripts.

    Next, editable will not install a package in a directory if it already exists.

    For instance if you install twisted, easy_install -e dir twisted will have no effect.

  2. Tarek Ziadé repo owner

    Try this patch and let me know if it fixes your issue (remember that an installed project does not get copied in the -e mode, but this behavior could probably change)

    diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
    --- a/setuptools/command/easy_install.py
    +++ b/setuptools/command/easy_install.py
    @@ -639,7 +639,8 @@
             self.update_pth(dist)
             self.package_index.add(dist)
             self.local_index.add(dist)
    -        self.install_egg_scripts(dist)
    +        if not self.editable:
    +            self.install_egg_scripts(dist)
             self.installed_projects[dist.key] = dist
             log.info(self.installation_report(requirement, dist, *info))
             if (dist.has_metadata('dependency_links.txt') and
    
    
  3. David Cournapeau reporter

    This works for me, thank for the fix.

    FYI, using easy_install -eNb somedir packagename always download the package, even if it is already installed. I think it is a useful behavior - I use it to download a package from pypi from the command line, without having to install e.g. yolk

  4. David Cournapeau reporter

    This works for me, thank for the fix.

    FYI, using easy_install -eNb somedir packagename always download the package, even if it is already installed. I think it is a useful behavior - I use it to download a package from pypi from the command line, without having to install e.g. yolk

  5. Anonymous

    Just FYI, the "fix" shown is not a real fix; the fact that process_distribution() is being called in the first place indicates a problem somewhere else in the control flow.

  6. Log in to comment