Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ python::install "${BUILD_DIR}" "${STACK}" "${python_full_version}" "${python_maj
package_manager_install_start_time=$(build_data::current_unix_realtime)
case "${package_manager}" in
pip)
pip::install_pip_setuptools_wheel "${python_home}" "${python_major_version}"
pip::install_pip "${python_home}" "${python_major_version}"
;;
pipenv)
pipenv::install_pipenv "${python_home}" "${python_major_version}" "${EXPORT_PATH}" "${PROFILE_PATH}"
Expand Down
12 changes: 6 additions & 6 deletions lib/pip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ PIP_VERSION=$(utils::get_requirement_version 'pip')
SETUPTOOLS_VERSION=$(utils::get_requirement_version 'setuptools')
WHEEL_VERSION=$(utils::get_requirement_version 'wheel')

function pip::install_pip_setuptools_wheel() {
function pip::install_pip() {
local python_home="${1}"
local python_major_version="${2}"

# We use the pip wheel bundled within Python's standard library to install our chosen
# pip version, since it's faster than `ensurepip` followed by an upgrade in place.
local bundled_pip_module_path
bundled_pip_module_path="$(utils::bundled_pip_module_path "${python_home}" "${python_major_version}")"

build_data::set_string "pip_version" "${PIP_VERSION}"

local packages_to_install=(
Expand Down Expand Up @@ -46,6 +41,11 @@ function pip::install_pip_setuptools_wheel() {
# app's requirements.txt in the last build). The install will be a no-op if the versions match.
output::step "Installing ${packages_display_text}"

# We use the pip wheel bundled within Python's standard library to install our chosen
# pip version, since it's faster than `ensurepip` followed by an upgrade in place.
local bundled_pip_module_path
bundled_pip_module_path="$(utils::bundled_pip_module_path "${python_home}" "${python_major_version}")"

# `--isolated`: Prevents any custom pip configuration added by third party buildpacks (via env
# vars or global config files) from breaking package manager bootstrapping.
# shellcheck disable=SC2310 # This function is invoked in an 'if' condition so set -e will be disabled.
Expand Down