File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -4,19 +4,29 @@ shopt -s inherit_errexit
44
55py_version=" ${1} "
66
7+ # Install Python interpreter under e.g. /snekbin/python/3.13/ (no patch version)
8+ # By dropping everything after, and including, the last period or hyphen.
9+ install_path=" ${py_version% [-.]* } "
10+
11+ # Ensure the suffix letter is retained for free-threaded or JIT versions of Python.
12+ if [[ $py_version == * t ]]; then
13+ install_path+=" t"
14+ fi
15+
716if [[ $py_version == * j ]]; then
817 # Enable JIT mode when passed a version that ends with a "j"
18+ install_path+=" j"
919 py_version=" ${py_version% j} "
1020 PYTHON_CONFIGURE_OPTS+=" --enable-experimental-jit"
1121fi
1222
1323" ${PYENV_ROOT} /plugins/python-build/bin/python-build" \
1424 " ${py_version} " \
15- " /snekbin/"
16- " /snekbin/bin/python" -m pip install -U pip
25+ " /snekbin/python/ ${install_path} "
26+ " /snekbin/python/ ${install_path} / bin/python" -m pip install -U pip
1727
1828# Clean up some unnecessary files to reduce image size bloat.
19- find /snekbin/ -depth \
29+ find /snekbin/python/ -depth \
2030\( \
2131 \( -type d -a \( \
2232 -name test -o -name tests -o -name idle_test \
You can’t perform that action at this time.
0 commit comments