From 0c9b234011f21ce7bdc993957867610dfec1258f Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Mon, 9 Oct 2023 22:18:47 +0100 Subject: Also split on hyphens in build python script This is needed as dev builds such as 3.13-dev use the suffix -dev, rather than a patch version. --- scripts/build_python.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/build_python.sh') diff --git a/scripts/build_python.sh b/scripts/build_python.sh index da937c2..1e6d423 100755 --- a/scripts/build_python.sh +++ b/scripts/build_python.sh @@ -7,8 +7,8 @@ py_version="${1}" # Install Python interpreter under e.g. /lang/python/3.11/ (no patch version). "${PYENV_ROOT}/plugins/python-build/bin/python-build" \ "${py_version}" \ - "/lang/python/${py_version%.*}" -"/lang/python/${py_version%.*}/bin/python" -m pip install -U pip + "/lang/python/${py_version%[-.]*}" +"/lang/python/${py_version%[-.]*}/bin/python" -m pip install -U pip # Clean up some unnecessary files to reduce image size bloat. find /lang/python/ -depth \ -- cgit v1.2.3