Skip to content

Commit

Permalink
Also split on hyphens in build python script
Browse files Browse the repository at this point in the history
This is needed as dev builds such as 3.13-dev use the suffix -dev, rather than a patch version.
  • Loading branch information
ChrisLovering committed Jan 24, 2024
1 parent c035f68 commit c625d86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit c625d86

Please sign in to comment.