]> code.ossystems Code Review - openembedded-core.git/commitdiff
python-scons-native: Make it useable if old host install exists
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Wed, 13 Aug 2014 17:41:04 +0000 (19:41 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 15 Aug 2014 17:19:50 +0000 (18:19 +0100)
This was recently fixed to work on Fedora 17 if no scons is installed
on the host by setting the PYTHONPATH to where BitBake has installed
scons. However, if an older version of scons than 2.3.0 is installed,
then it still breaks. This is due to how scons tries to determine its
installation by searching through standard paths. If it finds an old
installation it prepends that path to sys.path thereby causing it to
ignore the PYTHONPATH. The solution is to instead set SCONS_LIB_PATH
which works both if scons is not installed and if an older version is
installed.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python-scons-native_2.3.2.bb

index 067ed61a4e055291978bcce8f502ea4e19a098c0..dae89ab5d2888b9e380036ee0b6ecd07bd5c265b 100644 (file)
@@ -4,5 +4,5 @@ DEPENDS = "python-native"
 RDEPENDS_${PN} = ""
 
 do_install_append() {
-    create_wrapper ${D}${bindir}/scons  PYTHONPATH='$PYTHONPATH:${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}'
+    create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}'
 }