diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2022-08-05 10:14:54 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2022-08-05 17:17:48 +0200 |
commit | e2d7d9deeb9a763af2aeab64fc479a02d67b0c7c (patch) | |
tree | db27e1cfb2eb3e5b7dce0d48810f0759cab3c2ff /scripts | |
parent | 3964c01e6b5f0ba1076742cb5207966c10d8fda3 (diff) | |
download | ptxdist-e2d7d9deeb9a763af2aeab64fc479a02d67b0c7c.tar.gz ptxdist-e2d7d9deeb9a763af2aeab64fc479a02d67b0c7c.tar.xz |
ptxd_lib_setup_host_wrapper: add wrapper symlinks for all python versions
configure scripts often check explicitly for Python binaries by version. So
create symlinks to the python-wrapper for all versions available in the
system.
This way the wrapper will not be bypassed.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/ptxd_lib_wrapper.sh | 6 | ||||
-rwxr-xr-x | scripts/wrapper/python-wrapper | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/scripts/lib/ptxd_lib_wrapper.sh b/scripts/lib/ptxd_lib_wrapper.sh index 1488f617a..7cf14fc13 100644 --- a/scripts/lib/ptxd_lib_wrapper.sh +++ b/scripts/lib/ptxd_lib_wrapper.sh @@ -79,6 +79,12 @@ ptxd_lib_setup_host_wrapper() { ptxd_bailout "Unable to create ${python/[23]} wrapper link" fi done && + for python in python2.7{,-config} python3.{1..20}{,-config}; do + if type -P "${python}" > /dev/null; then + ptxd_replace_link "python-wrapper" "${wrapper_dir}/${python}" || \ + ptxd_bailout "Unable to create ${python} wrapper link" + fi + done && for tool in ar as nm objcopy objdump ranlib readelf size strip ; do tool_abs="$(which "${tool}" 2>/dev/null)" diff --git a/scripts/wrapper/python-wrapper b/scripts/wrapper/python-wrapper index 8449aae33..2ea0b2680 100755 --- a/scripts/wrapper/python-wrapper +++ b/scripts/wrapper/python-wrapper @@ -8,8 +8,8 @@ fi case "${name}" in python) dep="host-system-python / host-system-python3" ;; -python2) dep=host-system-python ;; -python3) dep=host-system-python3 ;; +python2*) dep=host-system-python ;; +python3*) dep=host-system-python3 ;; esac case " ${pkg_build_deps} " in |