From 0dcc1157a80af6ef64a0f3154b9857f4844c3554 Mon Sep 17 00:00:00 2001 From: Paul Taylor <178183+trxcllnt@users.noreply.github.com> Date: Thu, 4 Apr 2024 12:25:34 -0700 Subject: [PATCH] Pass `-U` to `pip install` so the venv updates setuptools (#258) * use pip install -U when creating venv so it updates setuptools * bump feature version --- features/src/rapids-build-utils/devcontainer-feature.json | 2 +- .../opt/rapids-build-utils/bin/make-pip-env.sh | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/features/src/rapids-build-utils/devcontainer-feature.json b/features/src/rapids-build-utils/devcontainer-feature.json index 14f9003c..9aaf323f 100644 --- a/features/src/rapids-build-utils/devcontainer-feature.json +++ b/features/src/rapids-build-utils/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "NVIDIA RAPIDS devcontainer build utilities", "id": "rapids-build-utils", - "version": "24.4.7", + "version": "24.4.8", "description": "A feature to install the RAPIDS devcontainer build utilities", "containerEnv": { "BASH_ENV": "/etc/bash.bash_env" diff --git a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-pip-env.sh b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-pip-env.sh index 86792cbf..eff0f8b2 100755 --- a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-pip-env.sh +++ b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-pip-env.sh @@ -11,7 +11,6 @@ # --pre Include pre-release and development versions. By default, pip only finds # stable versions. # --no-pre Don't install pre-release and development versions. -# --system-site-packages Give the virtual environment access to the system site-packages dir. # @_include_bool_options rapids-make-pip-dependencies -h | tail -n+2 | head -n-3; # # @_include_value_options rapids-make-pip-dependencies -h; @@ -23,13 +22,12 @@ make_pip_env() { local -; set -euo pipefail; - eval "$(_parse_args --take '-f,--force --pre --no-pre --system-site-packages' "${@:2}" <&0)"; + eval "$(_parse_args --take '-f,--force --pre --no-pre' "${@:2}" <&0)"; # shellcheck disable=SC1091 . devcontainer-utils-debug-output 'rapids_build_utils_debug' 'make-pip-env'; test ${#pre[@]} -eq 0 && pre=(--pre); - test ${#system_site_packages[@]} -eq 0 && system_site_packages=(); if test -n "${no_pre-}"; then pre=(); @@ -58,11 +56,11 @@ make_pip_env() { cat "${new_env_path}"; echo ""; - python -m venv "${system_site_packages[@]}" "${HOME}/.local/share/venvs/${env_name}"; + python -m venv "${HOME}/.local/share/venvs/${env_name}"; # shellcheck disable=SC1090 . "${HOME}/.local/share/venvs/${env_name}/bin/activate"; python -m pip install -U pip; - python -m pip install "${pre[@]}" -I -r "${new_env_path}"; + python -m pip install "${pre[@]}" -U -r "${new_env_path}"; # If the venv does exist but it's different from the generated one, # print the diff between the envs and update it elif ! diff -BNqw "${old_env_path}" "${new_env_path}" >/dev/null 2>&1; then