[Python-apps-team] Bug#620087: mercurial: /usr/bin/hg prepends /usr/lib/python2.5/site-packages/ to sys.path
Stefano Rivera
stefanor at debian.org
Tue Mar 29 22:15:49 UTC 2011
Package: mercurial
Version: 1.8.1-1
Severity: normal
Tags: patch
An Ubuntu developer ran into
https://bugs.launchpad.net/bugs/45250
Resulting in a crash:
> AttributeError: 'module' object has no attribute 'BufferedIOBase'
http://paste.ubuntu.com/587028/
Turns out we have the same problem.
It's caused by the python2.5 install happening before the 2.6 one, and
the 2.6 one doesn't replace the hg script from the 2.5 install. (It
would if we supplied --force)
I think the best fix here is to disable the path mangling, either by not
replacing @LIBDIR@ (hg sanity-checks for this) or by disabling the
sys.path mangling code in hg.
Here's a patch for disabling it in setup.py:
--- old/setup.py
+++ new/setup.py
@@ -306,7 +306,10 @@ class hginstallscripts(install_scripts):
cmdclass = {'build_mo': hgbuildmo,
'build_ext': hgbuildext,
'build_py': hgbuildpy,
- 'install_scripts': hginstallscripts}
+# Disabled on Debian. We install into the public namespace and don't need
+# to hack sys.path.
+# 'install_scripts': hginstallscripts}
+ }
packages = ['mercurial', 'mercurial.hgweb', 'hgext', 'hgext.convert',
'hgext.highlight', 'hgext.zeroconf']
I intend to commit this and Team Upload within a day or two, but would
obviously love a rejection / go-ahead / upload from one of the package's
maintainers.
SR
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_ZA.UTF-8, LC_CTYPE=en_ZA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages mercurial depends on:
ii libc6 2.11.2-11 Embedded GNU C Library: Shared lib
ii mercurial-common 1.8.1-1 scalable distributed version contr
ii python 2.6.6-3+squeeze6 interactive high-level object-orie
ii python-support 1.0.11 automated rebuilding support for P
ii ucf 3.0025+nmu1 Update Configuration File: preserv
mercurial recommends no packages.
Versions of packages mercurial suggests:
ii meld 1.4.0-2 graphical tool to diff and merge f
pn qct <none> (no description available)
ii tk8.4 [wish] 8.4.19-4 Tk toolkit for Tcl and X11, v8.4 -
ii tk8.5 [wish] 8.5.9-2 Tk toolkit for Tcl and X11, v8.5 -
ii vim 2:7.3.035+hg~8fdc12103333-1 Vi IMproved - enhanced vi editor
ii vim-gtk [vim 2:7.3.035+hg~8fdc12103333-1 Vi IMproved - enhanced vi editor -
ii vim-nox [vim 2:7.3.035+hg~8fdc12103333-1 Vi IMproved - enhanced vi editor
-- no debconf information
More information about the Python-apps-team
mailing list