From b7f4ace335f01afef7092e7afb83c06d27289687 Mon Sep 17 00:00:00 2001 From: graham Date: Wed, 18 Sep 2019 16:12:33 -0700 Subject: [PATCH] working with tcl-tk in PYTHON_CONFIGURE_OPTS --- plugins/python-build/bin/python-build | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 59899468..e04c1dc1 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -2222,6 +2222,19 @@ if [[ "$PYTHON_CONFIGURE_OPTS" != *"--enable-unicode="* ]]; then fi fi +# regex_to_match="(--with-tcltk-libs='([^']+)')" +if [[ "$PYTHON_CONFIGURE_OPTS" =~ (--with-tcltk-libs=\'([^\']+)\') ]]; then + tcltk_match="${BASH_REMATCH[1]}" + tcltk_match_quoted="${tcltk_match//--with-tcltk-libs=/}" + # remove it from PYTHON_CONFIGURE_OPTS since it will mess up compile + PYTHON_CONFIGURE_OPTS="${PYTHON_CONFIGURE_OPTS//$tcltk_match/}" + + # having issues passing the single quoted part, couldnt pass as single var and still work + package_option python configure "--with-tcltk-libs='${tcltk_match_quoted}'" + unset tcltk_match + unset tcltk_match_quoted +fi + # Unset `PIP_REQUIRE_VENV` during build (#216) unset PIP_REQUIRE_VENV unset PIP_REQUIRE_VIRTUALENV