From 16f7ea03e80ce02a31c9576c127a1d3b6f10bedc Mon Sep 17 00:00:00 2001 From: brogon Date: Mon, 25 Jul 2022 22:55:11 +0200 Subject: [PATCH] Fix: patterns for pypy2.*/pypy3.* versions (#2419) Co-authored-by: native-api --- plugins/python-build/bin/python-build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 5606cd7c..f2156645 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1637,10 +1637,13 @@ build_package_auto_tcltk() { fi } +# extglob must be set at parse time, not at runtime +# https://stackoverflow.com/questions/49283740/bash-script-throws-syntax-errors-when-the-extglob-option-is-set-inside-a-subsh +shopt -s extglob apply_python_patch() { local patchfile case "$1" in - Python-* | jython-* | pypy-* | stackless-* ) + Python-* | jython-* | pypy-* | pypy[:digit:].+([:digit:])-* | stackless-* ) patchfile="$(mktemp "${TMP}/python-patch.XXXXXX")" cat "${2:--}" >"$patchfile" @@ -1650,6 +1653,7 @@ apply_python_patch() { ;; esac } +shopt -u extglob build_package_symlink_version_suffix() { if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then