MacOSX compile problems

Christian Ebert blacktrash at gmx.net
Sun Jan 18 15:06:27 CST 2009


* Bastian Doetsch on Sunday, January 18, 2009 at 19:31:04 +0100
> I think I found the reason for the version not being determined. It  
> seems that sudo doesn't use the pythonpath I defined in
> 
> a) <myuser>/.MacOSX and
> b) /root/.MacOSX and
> c) /root/.profile

Isn't root's $HOME in /private/var/root on MacOS X? -- Well, at
least here it is.
 
> as "sudo hg version" produces the import stacktrace. If I "sudo su -"  
> and then type "hg version" the determining of the version works. So  
> does anyone know, how I can set the pythonpath globally on MacOSX?

As Matt wrote, I have my bash_profile source bashrc.

But, as I said in another post, you can do this entirely within
python

Create a .pth file eg.
/usr/local/lib/pyton2.6/site-packages/altinstall.pth that reads like
so:

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

Then you don't have to set PYTHONPATH at all.

c
-- 
\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