Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ LIBS=""
PYTHON=python
PYTHON_VERSION=
PYTHON_ROOT=
PYTHON_INCLUDES=
ICU_ROOT=

# Handle case where builtin shell version of echo command doesn't
Expand Down Expand Up @@ -288,6 +289,12 @@ if test "x$flag_no_python" = x; then
PYTHON_ROOT=`$PYTHON -c "import sys; print(sys.prefix)"`
echo $PYTHON_ROOT
fi

if test "x$PYTHON_INCLUDES" = x; then
$ECHO -n "Detecting Python include... "
PYTHON_INCLUDES=`$PYTHON -c "import sys; python_version = \"%d.%d\" % (sys.version_info[0], sys.version_info[1]); print (\"%s/include/python%s%s\" % (sys.prefix, python_version, '' if sys._is_gil_enabled() else 't'))"`
echo $PYTHON_INCLUDES
fi
fi

# Configure ICU
Expand Down Expand Up @@ -361,7 +368,7 @@ if test "x$flag_no_python" = x; then
import python ;
if ! [ python.configured ]
{
using python : $PYTHON_VERSION : "$PYTHON_ROOT" ;
using python : $PYTHON_VERSION : "$PYTHON_ROOT" : "$PYTHON_INCLUDES" ;
}
EOF
fi
Expand Down