[PATCH] Makefile: add install-mac for framework-based Python installations (issue1412)

Christian Ebert blacktrash at gmx.net
Wed Jan 14 03:39:45 CST 2009

* Brodie Rao on Tuesday, January 13, 2009 at 21:18:53 -0500
> On Jan 6, 2009, at 1:26 PM, Matt Mackall wrote:
>> Again, none of this is Mac-specific, so adding an install-mac
>> is a  step in the wrong direction. Python wants to install
>> stuff in bogus  places by default on various Linux distros
>> too! Just because Python has yet to gain any sense about
>> package management doesn't make it the right  thing to do.
>> Nothing but the operating system should be sticking stuff in
>> /usr/.

Related: why isn't /usr/local/etc/ not in mercurial's $RCPATH?

> /usr/ isn't part of the picture here. I'm trying to get
> Mercurial  installed in /Library/Python/2.5/site-packages,
> which is the equivalent of /usr/ local on OS X. The issue
> doesn't really have anything to do with where hg is going or
> the purpose of those folders. The problem is that OS X moves
> the local site-packages out of /usr completely, but keeps
> /usr/local/bin, /usr/local/man, etc., so --prefix doesn't work
> properly.
> I suppose I could just do this:
> $ sudo python setup.py install
> $ sudo make install-doc

You could also create a .pth file eg.
/Library/Python/2.5/site-packages/altinstall.pth that reads like

import os, site; site.addsitedir(os.path.expanduser('~/lib/python2.5')); site.addsitedir('/usr/local/lib/python2.5/site-packages')

This works well for other python stuff too, plus you wouldn't
have to fiddle with $PYTHONPATH.

\black\trash movie    _C O W B O Y_  _C A N O E_  _C O M A_
Ein deutscher Western/A German Western
-->> http://www.blacktrash.org/underdogma/ccc.html
-->> http://www.blacktrash.org/underdogma/ccc-en.html

More information about the Mercurial-devel mailing list