This repository was archived by the owner on Dec 26, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -273,13 +273,19 @@ function bootstrap_pex {
273
273
echo " ${bootstrapped} "
274
274
}
275
275
276
- function scrub_PEX_env_vars {
276
+ function scrub_env_vars {
277
277
# Ensure the virtualenv PEX runs as shrink-wrapped.
278
278
# See: https://github.com/pantsbuild/setup/issues/105
279
279
if [[ -n " ${! PEX_@ } " ]]; then
280
280
warn " Scrubbing ${! PEX_@ } "
281
281
unset " ${! PEX_@ } "
282
282
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
283
289
}
284
290
285
291
function bootstrap_virtualenv {
@@ -295,7 +301,7 @@ function bootstrap_virtualenv {
295
301
cd " ${staging_dir} "
296
302
echo " ${VIRTUALENV_REQUIREMENTS} " > requirements.txt
297
303
(
298
- scrub_PEX_env_vars
304
+ scrub_env_vars
299
305
" ${python} " " ${pex_path} " -r requirements.txt -c virtualenv -o virtualenv.pex
300
306
)
301
307
mkdir -p " $( dirname " ${bootstrapped} " ) "
@@ -355,7 +361,7 @@ function bootstrap_pants {
355
361
virtualenv_path=" $( bootstrap_virtualenv " ${python} " ) " || exit 1
356
362
green " Installing ${pants_requirement} into a virtual environment at ${bootstrapped} "
357
363
(
358
- scrub_PEX_env_vars
364
+ scrub_env_vars
359
365
# shellcheck disable=SC2086
360
366
" ${python} " " ${virtualenv_path} " --quiet --no-download " ${staging_dir} /install" && \
361
367
# Grab the latest pip, but don't advance setuptools past 58 which drops support for the
Original file line number Diff line number Diff line change 1
1
[GLOBAL ]
2
- pants_version = " 2.10 .0"
2
+ pants_version = " 2.11 .0"
3
3
backend_packages = [
4
4
" pants.backend.docker" ,
5
5
" pants.backend.docker.lint.hadolint" ,
You can’t perform that action at this time.
0 commit comments