diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2013-05-28 13:13:48 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-30 20:59:09 +0100 |
commit | f5d0f6becc6d1eb3a525a9e66ffd8bba52e2ae4e (patch) | |
tree | df003664cb023ba41f695e6aa26e54b7918a7e55 | |
parent | f1b8e24c3607cc8dce839c6f509f550c8e5d44d3 (diff) | |
download | poky-f5d0f6becc6d1eb3a525a9e66ffd8bba52e2ae4e.tar.gz |
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]
(From OE-Core rev: 1aa828d05ae1614689542c6a9ce6425a088bdc7d)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/python/python-scons-native_2.3.0.bb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-scons-native_2.3.0.bb b/meta/recipes-devtools/python/python-scons-native_2.3.0.bb index 1e4ec27ce1..067ed61a4e 100644 --- a/meta/recipes-devtools/python/python-scons-native_2.3.0.bb +++ b/meta/recipes-devtools/python/python-scons-native_2.3.0.bb | |||
@@ -2,3 +2,7 @@ require python-scons_${PV}.bb | |||
2 | inherit native pythonnative | 2 | inherit native pythonnative |
3 | DEPENDS = "python-native" | 3 | DEPENDS = "python-native" |
4 | RDEPENDS_${PN} = "" | 4 | RDEPENDS_${PN} = "" |
5 | |||
6 | do_install_append() { | ||
7 | create_wrapper ${D}${bindir}/scons PYTHONPATH='$PYTHONPATH:${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}' | ||
8 | } | ||