Skip to content

Commit

Permalink
Update comments in binary build script
Browse files Browse the repository at this point in the history
Misc comment fixes/improvements.
  • Loading branch information
edmorley committed Jun 26, 2024
1 parent 9b13266 commit 1fe9de0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions builds/build_python_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ CONFIGURE_OPTS=(
"--enable-optimizations"
# Make autoconf's configure option validation more strict.
"--enable-option-checking=fatal"
# Install Python into `/app/.heroku/python` rather than the default of `/usr/local`.
# Install Python into `/tmp/python` rather than the default of `/usr/local`.
"--prefix=${INSTALL_DIR}"
# Skip running `ensurepip` as part of install, since the buildpack installs a curated
# version of pip itself (which ensures it's consistent across Python patch releases).
"--with-ensurepip=no"
# Build the `pyexpat` module using the `expat` library in the stack image (which will
# Build the `pyexpat` module using the `expat` library in the base image (which will
# automatically receive security updates), rather than CPython's vendored version.
"--with-system-expat"
)
Expand All @@ -125,6 +125,7 @@ if [[ "${PYTHON_MAJOR_VERSION}" != 3.[8-9] ]]; then
#
# However, shared builds are slower unless `no-semantic-interposition`and LTO is used:
# https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup
# https://github.com/python/cpython/issues/83161
#
# It's only as of Python 3.10 that `no-semantic-interposition` is enabled by default,
# so we only use shared builds on Python 3.10+ to avoid needing to override the default
Expand All @@ -133,6 +134,7 @@ if [[ "${PYTHON_MAJOR_VERSION}" != 3.[8-9] ]]; then
"--with-lto"
# Counter-intuitively, the static library is still generated by default even when
# the shared library is enabled, so we disable it to reduce the build size.
# This option only exists for Python 3.10+.
"--without-static-libpython"
)
fi
Expand Down

0 comments on commit 1fe9de0

Please sign in to comment.