GNOME Bugzilla – Bug 448711
use python-config to get python includes
Last modified: 2007-08-08 20:40:22 UTC
This patch is shipped with the Ubuntu package and required to do a build using python-dbg
Created attachment 90191 [details] [review] use python-config to get python includes
Created attachment 90194 [details] [review] version updated to use test -x
Thanks!
This does not work in gentoo. python-config gives this output -lpython2.4 -lm -L/usr/lib/python2.4/config and gnome-menus-2.19.5 refuses to configure with --enable-python. Reverting to previous version of acinclude.m4 fixes the issue.
Hi, I'm one of the gentoo developers and can confirm the previous comment. Python version is 2.4.4. Is this flag limited to 2.5 by any chance ?
adding gnome herd to track down this issue.
This also happens on gnome-python-2.19.1 and gnome-python-desktop-2.19.1.
So, it works with my version of python2.4-config. Don't know why.
some ubuntu hackers around could enlighten us on what they do with their python patching/building ?
the patch has a test for python-config, if you don't have it available it uses the static definition
Sebastian, our problem, at least on Gentoo is that we do have python-config, but calling it does not give the expected includes, but just -lpython2.4 -lm -L/usr/lib/python2.4/config
Created attachment 92948 [details] ubuntu-python-config
Created attachment 92949 [details] gentoo-python-config here is gentoo's python-config script. Obviously ubuntu's version if far more complete and it seems more generic to me. I don't know where to pick the "reference" version of this file. I asked for directions from our python guys but they seem to be busy at the moment. and to get back to the bug, we can now see why this patch won't work on gentoo atm. I see that gnome-python as this too and I bet it'll spread on other packages sooner or later and I don't really want to unpatch all of these...
The upstream version is on http://svn.python.org/projects/python/trunk/Misc/python-config.in and is similar to the Ubuntu one, looks like a gentoo bug
Yes and no; as I understand it, python 2.4 didn't ship a python-config (at least, it's not in the tarball for 2.4.4) Obviously python 2.5 does, so it's fine. But, depending on python-config fails when python 2.4 or less is installed. So, either python-config shouldn't be needed, or the dep for python should be for 2.5, I believe. I'll try and get our manually created python-config for 2.4 updated to work. Does ubuntu have one for python 2.4? Does this work with that?
did you read the change? "+if test -x "$PYTHON-config"; then +PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null` +else" the "if test -x "$PYTHON-config"; then" means that if there is a python-config it's used otherwise it does the same thing as before the change
Ah, I missed that. So the problem is gentoo's abortive python-config for 2.4. I'll get it fixed.