Bug 21017 - add python path for cross compiling
Summary: add python path for cross compiling
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: python (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Simon McVittie
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-04-02 13:45 UTC by Robert Schwebel
Modified: 2011-05-24 09:53 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch to add --with-python-includes for cross compilation (2.84 KB, patch)
2009-04-02 13:45 UTC, Robert Schwebel
Details | Splinter Review

Description Robert Schwebel 2009-04-02 13:45:38 UTC
Created attachment 24476 [details] [review]
patch to add --with-python-includes for cross compilation

When cross compiling dbus-python, we need to build a python for the
"build" machine and one for the "host" system. The current test for
python headers incorrectly grabs up the "build" headers, although this
package is built for the "host" machine.

This patch adds a "--with-python-includes=<path>" switch, which makes it
possible to overwrite the autodetected path with a pre-known one. Thus
it is possible for cross build systems like ptxdist, buildroot etc. to
set an already known path while cross compiling.
Comment 1 Simon McVittie 2011-05-24 09:53:00 UTC
For the sake of a concrete example, suppose you have Python 2.6 in --prefix=/opt/misc and want to use that (hence you need something like "-I/opt/misc/include/python2.6" in your CPPFLAGS).

It seems your patch results in this usage:

    ./configure --with-python-includes=/opt/misc/include

which I find surprising - I'd have expected to have to include the Python-version-specific part as well.

I've applied a patch which instead results in this usage:

    ./configure PYTHON_INCLUDES="-I/opt/misc/include/python2.6"

which is consistent with how you'd override PYTHON, DBUS_CFLAGS and so on.

Since you reported this bug I'd added a use of PYTHON_LIBS, so I've allowed that to be overridden in the same way.

Fixed in git for 0.84.0.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.