From c3ba32f87133b3bd517524f293559dbaa49e94ea Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 21 Jan 2021 16:22:07 +0100 Subject: [PATCH 1/3] python2-wrapper: Update wrapper scripts Use individual wrapper scripts instead of a hardlinked prototype which forwards to $(basename "$0"), because this doesn't work if the user links or hardlinks the wrapper to an unexpected command not available in the package. --- python2-wrapper.be0 | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/python2-wrapper.be0 b/python2-wrapper.be0 index 5cca5a4d4..f4a8395ca 100755 --- a/python2-wrapper.be0 +++ b/python2-wrapper.be0 @@ -1,6 +1,6 @@ #!/usr/bin/env beesh -# BEE_VERSION python2-wrapper-1.3-0 +# BEE_VERSION python2-wrapper-1.4-0 ## this file was created by bee init and should be executed to build a ## bee-package. (Additional hints are located at the end of this file.) @@ -57,12 +57,15 @@ SRCURL[0]="" # bee_configure #} -mee_build() { - echo -e '#! /bin/bash\nprun python2 $(basename "$0") "$@"' >wrapper - chmod +x wrapper +#mee_buid() { +# bee_build +#} - echo -e '#! /bin/bash\nprun python-2.7 $(basename "$0") "$@"' >wrapper2.7 - chmod +x wrapper2.7 +create_bin_wrapper() { + cmd="$1" + target="${2:-$1}" + echo -e "#! /bin/bash\nprun python2 \"$target\" \"\$@\"" > "$D$BINDIR/$cmd" + chmod +x "$D$BINDIR/$cmd" } mee_install() { @@ -76,14 +79,12 @@ mee_install() { xml2po \ gnome-doc-tool \ pssh \ - iotop + iotop \ + python2.7 do - ln "$B/wrapper" "$D$BINDIR/$cmd" + create_bin_wrapper $cmd done - - ln "$B/wrapper2.7" "$D$BINDIR/python2.7" } -## by default this may be 'make install DESTDIR="${D}"' ############################################################################### ## From 89551f9b820cf62abb1f4a1fc43bc98d8d23ef50 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 21 Jan 2021 16:33:33 +0100 Subject: [PATCH 2/3] python3-wrapper: Update wrapper scripts Use individual wrapper scripts instead of a hardlinked prototype which forwards to $(basename "$0"), because this doesn't work if the user links or hardlinks the wrapper to an unexpected command not available in the package. --- python3-wrapper.be0 | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/python3-wrapper.be0 b/python3-wrapper.be0 index 59e2977bf..152998056 100755 --- a/python3-wrapper.be0 +++ b/python3-wrapper.be0 @@ -1,6 +1,6 @@ #!/usr/bin/env beesh -# BEE_VERSION python3-wrapper-1.1-0 +# BEE_VERSION python3-wrapper-1.2-0 ## this file was created by bee init and should be executed to build a ## bee-package. (Additional hints are located at the end of this file.) @@ -57,20 +57,15 @@ SRCURL[0]="" # bee_configure #} -mee_build() { - echo -e '#! /bin/bash\nprun python3 "$(basename "$0")" "$@"' >wrapper - chmod +x wrapper -} +#mee_build() { +# bee_build +#} create_bin_wrapper() { cmd="$1" - target="$2" - if [ -z "$target" ]; then - ln "$B/wrapper" "$D$BINDIR/$cmd" - else - echo -e "#! /bin/bash\nprun python3 \"$target\" \"\$@\"" > "$D$BINDIR/$cmd" - chmod +x "$D$BINDIR/$cmd" - fi + target="${2:-$1}" + echo -e "#! /bin/bash\nprun python3 \"$target\" \"\$@\"" > "$D$BINDIR/$cmd" + chmod +x "$D$BINDIR/$cmd" } mee_install() { @@ -104,10 +99,9 @@ mee_install() { rst2s5.py \ rstpep2html.py do - ln "$B/wrapper" "$D$BINDIR/$cmd" + create_bin_wrapper $cmd done } -## by default this may be 'make install DESTDIR="${D}"' ############################################################################### ## From aa315d1c5c7e1216d6c7f82cbdb46f49ee82ce86 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Wed, 3 Feb 2021 19:27:46 +0100 Subject: [PATCH 3/3] python3-wrapper: Remove dxsfunctional pyenv3 command --- python3-wrapper.be0 | 1 - 1 file changed, 1 deletion(-) diff --git a/python3-wrapper.be0 b/python3-wrapper.be0 index 152998056..435657467 100755 --- a/python3-wrapper.be0 +++ b/python3-wrapper.be0 @@ -75,7 +75,6 @@ mee_install() { create_bin_wrapper pydoc3 create_bin_wrapper python3-config create_bin_wrapper python3 - create_bin_wrapper pyenv3 pyenv-3.3 create_bin_wrapper ipython3 create_bin_wrapper meson