aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_python.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/build_python.sh b/scripts/build_python.sh
index d026eb8..7b1fce5 100755
--- a/scripts/build_python.sh
+++ b/scripts/build_python.sh
@@ -8,11 +8,18 @@ py_version="${1}"
# By dropping everything after, and including, the last period or hyphen.
install_path="${py_version%[-.]*}"
-# If python version ends with a t, then ensure Python is installed to a dir ending with a t.
+# Ensure the suffix letter is retained for free-threaded or JIT versions of Python.
if [[ $py_version == *t ]]; then
install_path+="t"
fi
+if [[ $py_version == *j ]]; then
+ # Enable JIT mode when passed a version that ends with a "j"
+ install_path+="j"
+ py_version="${py_version%j}"
+ PYTHON_CONFIGURE_OPTS+=" --enable-experimental-jit"
+fi
+
"${PYENV_ROOT}/plugins/python-build/bin/python-build" \
"${py_version}" \
"/snekbin/python/${install_path}"