Bug 3438 - Shabang path on Mac OS X Lion avoids to load extensions from custom Python installation
Summary: Shabang path on Mac OS X Lion avoids to load extensions from custom Python in...
Status: RESOLVED WONTFIX
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-09 06:47 UTC by Giuseppe Caruso
Modified: 2012-05-13 04:54 UTC (History)
3 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Giuseppe Caruso 2012-05-09 06:47 UTC
In Mac OS X default package[1] shabang in /usr/local/bin/hg has been set to
`#/usr/bin/python` invoking, then, default system python installation. If a
user, quite common scenario, installed another, updated, python version,
extensions installed by easy_install bound to custom python isntallation
fail to be loaded.

To fix it it's enough to change shabang to `#/usr/local/env python`

[1] http://mercurial.berkwood.com/
Comment 1 Augie Fackler 2012-05-09 07:52 UTC
We actually construct the shebang line as part of the install process. Your
problem was that you installed dulwich (required by hg-git) in your upgraded
Python, which is not the Python used by the OS X packages provided by
berkwood. Using /usr/bin/env python will actually make things worse in the
presence of stuff like virtualenv.
Comment 2 Giuseppe Caruso 2012-05-09 07:57 UTC
I am sorry. I discussed the issue in IRC and they explain me the problem
when switching to VirtualEnvs.
The solution is to install extensions using /usr/bin/easy_install so that
Mercurial environment and development one are separated environments.

Thanks for your patience.
Comment 3 Bugzilla 2012-05-12 09:31 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:31 EDT  ---

This bug was previously known as _bug_ 3437 at http://mercurial.selenic.com/bts/issue3437