Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit b7b4e28

Browse files
Merge pull request #2 from grapl-security/update-pants-version
Update Pants Version
2 parents ac1f81e + e0f7da0 commit b7b4e28

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

pants

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,19 @@ function bootstrap_pex {
273273
echo "${bootstrapped}"
274274
}
275275

276-
function scrub_PEX_env_vars {
276+
function scrub_env_vars {
277277
# Ensure the virtualenv PEX runs as shrink-wrapped.
278278
# See: https://github.com/pantsbuild/setup/issues/105
279279
if [[ -n "${!PEX_@}" ]]; then
280280
warn "Scrubbing ${!PEX_@}"
281281
unset "${!PEX_@}"
282282
fi
283+
# Also ensure pip doesn't think packages on PYTHONPATH
284+
# are already installed.
285+
if [ -n "${PYTHONPATH:-}" ]; then
286+
warn "Scrubbing PYTHONPATH"
287+
unset PYTHONPATH
288+
fi
283289
}
284290

285291
function bootstrap_virtualenv {
@@ -295,7 +301,7 @@ function bootstrap_virtualenv {
295301
cd "${staging_dir}"
296302
echo "${VIRTUALENV_REQUIREMENTS}" > requirements.txt
297303
(
298-
scrub_PEX_env_vars
304+
scrub_env_vars
299305
"${python}" "${pex_path}" -r requirements.txt -c virtualenv -o virtualenv.pex
300306
)
301307
mkdir -p "$(dirname "${bootstrapped}")"
@@ -355,7 +361,7 @@ function bootstrap_pants {
355361
virtualenv_path="$(bootstrap_virtualenv "${python}")" || exit 1
356362
green "Installing ${pants_requirement} into a virtual environment at ${bootstrapped}"
357363
(
358-
scrub_PEX_env_vars
364+
scrub_env_vars
359365
# shellcheck disable=SC2086
360366
"${python}" "${virtualenv_path}" --quiet --no-download "${staging_dir}/install" && \
361367
# Grab the latest pip, but don't advance setuptools past 58 which drops support for the

pants.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[GLOBAL]
2-
pants_version = "2.10.0"
2+
pants_version = "2.11.0"
33
backend_packages = [
44
"pants.backend.docker",
55
"pants.backend.docker.lint.hadolint",

0 commit comments

Comments
 (0)