[issue3387] OS X Lion, fresh Python 2.7.3 and hg 2.1.2 == CRASH
Christian Tismer
bugs at mercurial.selenic.com
Fri Apr 20 13:42:50 CDT 2012
New submission from Christian Tismer <tismer at stackless.com>:
This bug was tested on two OS X Lion machines.
After installing genuine Mac Python 2.7.3 from python.org,
using python-2.7.3-macosx10.6.dmg (official for 10.6 and 10.7)
Installed mercurial-2.1.2+20120401-py2.7-macosx10.7.mpkg
Symptom:
$ hg
Traceback (most recent call last):
File "/usr/local/bin/hg", line 36, in <module>
mercurial.util.setbinary(fp)
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line
76, in __getattribute__
return getattr(self._module, attr)
AttributeError: 'module' object has no attribute 'setbinary'
Reason:
The python 2.7.3 installer puts python into /usr/local/bin .
The mercurial installer installs in the correct site-packages.
But the shebang in /usr/local/bin/hg has a hardcoded "#!/usr/bin/python"
which causes the hg command to start the wrong python, which is lacking
a 2.7 feature and crashes.
In my case there happens to be an older hg version installed.
But this should not matter at all.
Resolution (my hack):
- the shebang line of the hg command should contain the right python path.
Resolution (clean):
- I propose to check the python version that is claimed in the name of the
mpkg if it really is installed, and then either
- insert the correct path into the hg script
- reject installation if the correct version is not installed
I marked this as critical because it puts hg and its testing quality
before publishing a release into a bad light that hg does not deserve.
Kind regards - Chris
p.s.: I'm the one who wrote stackless python.
Hey to mercurial, really great!
----------
messages: 19688
nosy: ctismer
priority: critical
status: chatting
title: OS X Lion, fresh Python 2.7.3 and hg 2.1.2 == CRASH
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3387>
____________________________________________________
More information about the Mercurial-devel
mailing list