[gobolinux-users] Issues while building Mercurial

Michael Homer michael at gobolinux.org
Fri Apr 3 12:09:40 NZDT 2009

On Friday 03 April 2009 11:32:43 Daed Lee wrote:
> I ran into a few problems while building Mercurial on Rootless on Mac OS X.
> First, Compile gave me the following errors:
> Compile: Compiling Mercurial version 1.2.1, revision r1.
> Traceback (most recent call last):
>   File "/Users/daed/GoboLinux/System/Links/Executables/GuessLatest",
> line 9, in <module>
>     from PythonUtils import *
> ImportError: No module named PythonUtils
> and
> Compile: Stripping executables...
> Traceback (most recent call last):
>   File "/Users/daed/GoboLinux/System/Links/Executables/CheckDependencies",
> line 6, in <module>
>     from GuessProgramCase import *
> ImportError: No module named GuessProgramCase
> Seems like the error is caused by the Mercurial recipe resetting
> environment=(
>   "PYTHONPATH=$target/lib/python"
> )
> I also found this bug report: http://bugs.gobolinux.org/view.php?id=378
> Despite the Compile errors, the build went through, however when
> trying hg debuginstall, I got the following error:
> abort: couldn't find mercurial libraries in
> [/Users/daed/GoboLinux/Programs/Mercurial/1.2.1/bin
> /Users/daed/GoboLinux/System/Links/Libraries/python2.3/site-packages
> /Users/daed/GoboLinux/System/Links/Libraries/python2.4/site-packages
> /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip
> /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5
> /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat
> /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat
> /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat
> /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python
> /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-
> /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-
>dynload /Library/Python/2.5/site-packages
> /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/
>PyObjC] (check your install and PYTHONPATH)
> Fixed by editing StartRootless:
> export
> PYTHONPATH="${goboPrefix}/System/Links/Libraries/python2.3/site-packages:${
> changed to:
> export
> PYTHONPATH="${goboPrefix}/System/Links/Libraries/python2.3/site-packages:${
> Is this required every for every new version of Python?
Probably, yes. It's a Rootless-specific problem (as is the one above, I think); 
if you use our Python, PYTHONPATH isn't used and /S/L/L/python2.{6,5,4,3} is 
inserted directly into sys.path. If you're using the system Python though that 
won't be there and you have to override it; in that case, yes, you'll have to 
update it each time (and you probably want to reverse the order).

Mercurial probably overrides PYTHONPATH because setuptools complains (in some 
variants) if you try to install outside of it. If you aren't using the 
variable, that's not a problem, but it's problematic for Rootless where you 
are. I'm not sure how to fix that other than making recipes always use 
> Lastly, I was prompted during the Mercurial build to install Python
> 3.0.1 as a dependency. As far as I can tell Python 3.0 isn't backward
> compatible with Python 2.x. Should the recipe be changed so that the
> Dependency file reads "Python < 3.0" (not sure if that's the correct
> syntax)?
Yes,  that should be updated. New recipe committed.

In fact, it looks like the latest version doesn't need that environmental 
override anyway, so I've taken it out too. You should just be able to Compile 
it without errors now.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.gobolinux.org/pipermail/gobolinux-users/attachments/20090403/e7b5728c/attachment.pgp 

More information about the gobolinux-users mailing list