Skip to contentSkip to conversation

python-scons-native: fix invoking scons failed on Fedora-17

PATCH New Hongxu Jia 1 participant 2 messages May 28, 2013

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover python-scons-native: fix invoking scons failed on Fedora-17

The following changes since commit 350c36fcd97e8ef223b91e548d39c346c1c4cb29:

bitbake: test/fetch: Allow the conditional network tests to work under python 2.6 (2013-05-17 12:42:08 +0300)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib hongxu/fix-scons
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-scons

Hongxu Jia (1):
python-scons-native: fix invoking scons failed on Fedora-17

 meta/recipes-devtools/python/python-scons-native_2.3.0.bb |    4 ++++
 1 file changed, 4 insertions(+)
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 1/1 python-scons-native: fix invoking scons failed on Fedora-17

While the destro didn't install scons, build scons by python-scons-native,
and invoke it with the error:
...
$scons -h
Traceback (most recent call last):
File "/buildarea2/hongxujia/build-20130520-udev-emenlow/tmp/sysroots/x86_64-linux/usr/bin/scons", line 188, in <module>
import SCons.Script
ImportError: No module named SCons.Script
...

1, While building scons as default, scons's lib will be install in the dir of scons' or scons-2.3.0' if the option `--install-lib' is not set explicitly.

2, While build python-scons-native, --install-lib' is explicitly set, and scons's lib was not installed in the dir of scons' or `scons-2.3.0'.

3, While invoke scons-native, the scons searches the lib in ${STAGING_DIR_HOST}/ ${PYTHON_SITEPACKAGES_DIR}/scons, ${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}/ scons-2.3.0 rather than ${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}.

Use create_wrapper to relocate scons-native to add `${STAGING_DIR_HOST}/${PYTHON _SITEPACKAGES_DIR}' to PYTHONPATH, so scons-native could find out the lib.

[YOCTO #4562]

---
 meta/recipes-devtools/python/python-scons-native_2.3.0.bb |    4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-devtools/python/python-scons-native_2.3.0.bb +4 -0
index 1e4ec27..067ed61 100644
@@ -2,3 +2,7 @@ require python-scons_${PV}.bb
 inherit native pythonnative
 DEPENDS = "python-native"
 RDEPENDS_${PN} = ""
+
+do_install_append() {
+    create_wrapper ${D}${bindir}/scons  PYTHONPATH='$PYTHONPATH:${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}'
+}
Signature · 1 line
1.7.10.4