Re: [Gtk-osx-users] Building gtk-osx on Lion -- no python?



On Aug 5, 2011, at 5:44 AM, Phillip Heller wrote:

> Greetings,
> 
>  I've upgraded to Lion and am trying to get my build environment working again.  Firstly, I've pulled in MacOS10.5.sdk and gcc-4.0 from Xcode 3.2.6, and set the appropriate environment variables for CC and CXX.  However, jhbuild does not seem to build a python, even though I've set _gtk_osx_use_jhbuild_python = True, and included meta-gtk-osx-python in my modules array.
> 
> Instead, once jhbuild gets to meta-gtk-osx-python, it first reaches pycairo-python2.6, which fails as it can't find Python.h with the system python in the path, which is presumably due to the following:
> 
> exit shell to continue with build
> bash-3.2$ /usr/bin/python-config --includes
> Traceback (most recent call last):
>  File "/usr/bin/python2.7-config", line 26, in <module>
>    pyver = sysconfig.get_config_var('VERSION')
>  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/sysconfig.py", line 585, in get_config_var
>    return get_config_vars().get(name)
>  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/sysconfig.py", line 498, in get_config_vars
>    func()
>  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/sysconfig.py", line 407, in _init_posix
>    raise DistutilsPlatformError(my_msg)
> distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.5" but "10.7" during configure
> 
> I believe MACOS_DEPLOYMENT_TARGET is set thusly by the call to setup_sdk with a target of 10.5, which I wish to do for backwards compatibility.
> 
> Any suggestions as to how to get the jhbuild python built?

Python is specified as a soft dependency of pygtk, affording the option of building against the installed Python. To build Python, specify it in your list of modules.... and for building Gnucash, there's no need to build meta-gtk-osx-python unless you're going to write GUI elements in Python, so you can just say "jhbuild build python gnucash".

Yes, MACOS_DEPLOYMENT_TARGET is set by setup_sdk based on the "target" parameter. Python2.7 is new to Lion, so it's built with a target of 10.7; you might try building against Python2.6, but I suspect that its target is 10.6. Leopard shipped with Python2.5, which Lion doesn't include. (Interestingly, Lion also doesn't include Python3. I guess Apple decided that not enough people were using it yet and they needed to keep the download size under control.)

Regards,
John Ralls







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]