[jaunty] setuptools adds 'local' to prefix, breaking easy_install

Bug #344410 reported by Luke Plant
2
Affects Status Importance Assigned to Milestone
python-setuptools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python-setuptools

Ubuntu's version of setuptools uses incorrect paths in Jaunty when using '--prefix' for easy_install - it adds 'local' into several directories.

This means I can no longer 'easy_install' to the same directories I was using before e.g.:

------
$ easy_install-2.5 --prefix=$HOME/.local -Z elementtree
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 2] No such file or directory: '/home/luke/.local/local/lib/python2.5/site-packages/test-easy-install-20511.pth'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /home/luke/.local/local/lib/python2.5/site-packages

This directory does not currently exist. Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
--------

It has added 'local/' into the path - it should be installing into:

    /home/luke/.local/lib/python2.5/site-packages

not

    /home/luke/.local/local/lib/python2.5/site-packages

It used to do the first (i.e. in Intrepid, possibly more recently), and there is now no way to convince it to do what it should be doing.

The reason for this behaviour is obvious, when you look at the source. Ubuntu (or someone) has patched setuptools (see the attached diff, which is *not* a suggestion, but what has already been done). This patch has broken easy_install, at least for python 2.5 and custom prefixes.

I'm guessing the patch is supposed to make things work nice with mutliple versions of Python, but it needs reverting or fixing at the moment.

Revision history for this message
Luke Plant (spookylukey) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-setuptools - 0.6c9-0ubuntu4

---------------
python-setuptools (0.6c9-0ubuntu4) jaunty; urgency=low

  * Update the installation schemes in easy_install to follow the modified
    distutils install command:
    - When the --prefix option is used for setup.py install, Use the
      `posix' scheme. LP: #344410.
    - Use the `deb_system' scheme if --install-layout=deb is specified.
    - Use the the `unix_local' scheme if neither --install-layout=deb
      nor --prefix is specified.
  * Always use the `posix' scheme for setup.py install in a virtualenv
    setup. LP: #339904.
  * Error out when easy_install tries to install into /usr, unless the
    (new) option --force-installation-into-system-dir is given (heh, this
    option name is even longer than --single-version-externally-managed).

 -- Matthias Klose <email address hidden> Sat, 04 Apr 2009 13:13:59 +0200

Changed in python-setuptools (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.