distutils appends '/local' to to user-specified install prefix

Bug #338395 reported by Christopher Williams
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python2.6 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

In python2.6 2.6.1-1ubuntu1 on jaunty, distutils has been patched to make a bare 'python setup.py install' use /usr/local instead of /usr (distutils-install-layout.dpatch). The problem is that this also prevents me from using distutils to install a python module to somewhere like /opt/foo. If I run 'python setup.py install --prefix=/opt/foo', the package is installed to /opt/foo/local.

A better solution might be to modify the default prefix to /usr/local and make ubuntu packages override it.

Revision history for this message
Sascha Silbe (sascha-ubuntu-launchpad) wrote :

This breaks the whole sugar-jhbuild environment [1] on Ubuntu Jaunty as Python packages will install to the wrong path.

[1] http://wiki.sugarlabs.org/go/DevelopmentTeam/Jhbuild

Michael Vogt (mvo)
Changed in python2.6 (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Matthias Klose (doko)
Changed in python2.6 (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python2.6 - 2.6.1-1ubuntu2

---------------
python2.6 (2.6.1-1ubuntu2) jaunty; urgency=low

  * Update installation schemes: LP: #338395.
    - When the --prefix option is used for setup.py install, Use the
      `unix_prefix' scheme.
    - 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.
    - The options --install-layout=deb and --prefix are exclusive.
  * Don't fail installation/removal if directories in /usr/local cannot
    be created. LP: #338227.

 -- Matthias Klose <email address hidden> Wed, 18 Mar 2009 12:12:34 +0100

Changed in python2.6:
status: In Progress → Fix Released
Revision history for this message
David Huggins-Daines (dhuggins) wrote :

Hmm, this is still broken in python2.6 2.6.4~rc2-0ubuntu1 on karmic!

dhuggins@gorb:~/Projects/Sphinx/sphinxbase/amd64-linux/python$ python2.6 setup.py install --prefix=/usr/local
running install
running build
running build_ext
running install_lib
creating /usr/local/local
error: could not create '/usr/local/local': Permission denied

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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