summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEnguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>2024-02-19 17:55:21 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-20 12:58:20 +0000
commit45704319661570b45ef69fddd6b4b4fa22ca80d1 (patch)
treeb7a91358d0dff9553788bbbd179c900ad1031466 /scripts
parentecb698ca5b4f76937dd3bee927465b17866d50be (diff)
downloadopenembedded-core-contrib-45704319661570b45ef69fddd6b4b4fa22ca80d1.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. Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/lib/devtool/ide_sdk.py2
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:
does not need to start a bitbake server. All information from tinfoil
is hard-coded in the generated script.
"""
- cmd_lines = ['#!/usr/bin/env python3']
+ cmd_lines = ['#!%s' % str(sys.executable)]
cmd_lines.append('import sys')
cmd_lines.append('devtool_sys_path = %s' % str(sys.path))
cmd_lines.append('devtool_sys_path.reverse()')