diff options
author | Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> | 2024-02-19 17:55:21 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-20 12:58:41 +0000 |
commit | 8e84fbba7270335c0919a77d539f1a703f97676f (patch) | |
tree | 518ab7c4adafadd1019370d1eab003ddb56050b9 /scripts/lib | |
parent | 730bd999d641301d46159b4dbbcafa87bbc950fc (diff) | |
download | poky-8e84fbba7270335c0919a77d539f1a703f97676f.tar.gz |
devtool: ide_sdk: Use bitbake's python3 for generated scripts
The generated scripts use the sys.path configuration found inside
bitbake. It can be a different python version than the one used on the
host through the IDE.
For instance, when running the generated script
deploy_target_cmake-example-core2-64 from an eSDK generated on another
machine, I got the following exception:
AssertionError: SRE module mismatch
We need to match the sys.executable to the sys.path.
(From OE-Core rev: 45704319661570b45ef69fddd6b4b4fa22ca80d1)
Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rwxr-xr-x | scripts/lib/devtool/ide_sdk.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/devtool/ide_sdk.py b/scripts/lib/devtool/ide_sdk.py index 3986dc1436..1467974480 100755 --- a/scripts/lib/devtool/ide_sdk.py +++ b/scripts/lib/devtool/ide_sdk.py | |||
@@ -750,7 +750,7 @@ class RecipeModified: | |||
750 | does not need to start a bitbake server. All information from tinfoil | 750 | does not need to start a bitbake server. All information from tinfoil |
751 | is hard-coded in the generated script. | 751 | is hard-coded in the generated script. |
752 | """ | 752 | """ |
753 | cmd_lines = ['#!/usr/bin/env python3'] | 753 | cmd_lines = ['#!%s' % str(sys.executable)] |
754 | cmd_lines.append('import sys') | 754 | cmd_lines.append('import sys') |
755 | cmd_lines.append('devtool_sys_path = %s' % str(sys.path)) | 755 | cmd_lines.append('devtool_sys_path = %s' % str(sys.path)) |
756 | cmd_lines.append('devtool_sys_path.reverse()') | 756 | cmd_lines.append('devtool_sys_path.reverse()') |