[oe] OT: determining in `Makefile.in` the Python version/path
Andreas Oberritter
obi at opendreambox.org
Sun Jan 9 22:17:52 UTC 2011
On 01/09/2011 10:07 PM, Paul Menzel wrote:
> I tried to use `python-config` to determine the Python version [3].
>
> ifeq (arm, $(ARCH))
> -# Force external python2.5 for now!
> -LIBS +=-lpython2.5
> +# Force external Python for now!
> +LIBS += $(shell python-config --libs)
> endif
>
> This fails with the following error though documented in `log.do_compile`.
>
> Traceback (most recent call last):
> File "/oe/build/angstrom-dev/sysroots/i686-linux/usr/bin/python-config", line 6, in <module>
> from distutils import sysconfig
> File "/oe/build/angstrom-dev/sysroots/i686-linux/usr/lib/python2.6/distutils/sysconfig.py", line 22, in <module>
> PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
>
For OE's Python, you need to set some variables in your recipe, e.g.:
EXTRA_OECONF = " \
BUILD_SYS=${BUILD_SYS} \
HOST_SYS=${HOST_SYS} \
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
"
Regards,
Andreas
More information about the Openembedded-devel
mailing list