From 6ccae503ae8fc179d9bd1f997efded500c63084b Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Wed, 28 Dec 2022 11:08:55 +0100 Subject: [PATCH] allow override of python3-config. --- misc/python3-config.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/misc/python3-config.sh b/misc/python3-config.sh index ee6cde7..c70bc58 100755 --- a/misc/python3-config.sh +++ b/misc/python3-config.sh @@ -5,10 +5,16 @@ if [ $# -ne 1 ]; then exit 1 fi -python3-config $1 --embed > /dev/null 2>&1 +if [ ! -z "$PYTHON_CONFIG" ]; then + BIN=$PYTHON_CONFIG +else + BIN=python3-config +fi + +$BIN $1 --embed > /dev/null 2>&1 if [ $? -eq 0 ]; then - python3-config $1 --embed + $BIN $1 --embed else - python3-config $1 + $BIN $1 fi