@@ -491,28 +491,9 @@ functions:
491491 # The aws_e2e_assume_role script requires python3 with boto3.
492492 # Set up or use an existing python virtualenv for boto3.
493493 venv='venv'
494- venvNonWindows () { . "$venv"/bin/activate; python3 -m pip install boto3; }
495- venvWindows () { . "$venv"/Scripts/activate; pip install boto3; }
496-
497- # default to python3 inside mongodbtoolchain
498- PATH=/opt/mongodbtoolchain/v3/bin/:$PATH
499-
500- if [ -f "$venv"/bin/activate ]; then
501- echo 'activating existing virtualenv'
502- venvNonWindows
503- elif [ -f "$venv"/Scripts/activate ]; then
504- echo 'activating existing virtualenv'
505- venvWindows
506- elif virtualenv "$venv" || python -m virtualenv "$venv"; then
507- echo 'creating new virtualenv'
508- if [ -f "$venv"/bin/activate ]; then
509- echo 'activating new virtualenv'
510- venvNonWindows
511- elif [ -f "$venv"/Scripts/activate ]; then
512- echo 'activating new virtualenv'
513- venvWindows
514- fi
515- fi
494+ mise exec python -- python3 -m venv "$venv"
495+ . "$venv"/bin/activate
496+ pip install boto3
516497
517498 pip list
518499
@@ -528,8 +509,9 @@ functions:
528509 set -v
529510 set -e
530511
512+ # There's no need to use mise here, since this will work with any version of Python.
531513 jsonkey () { python -c "import sys, json; sys.stdout.write(json.load(sys.stdin)['$1'])" < creds.json; }
532- urlencode () { python -c "import sys, urllib as ul; sys.stdout.write(ul.quote_plus('$1'))"; }
514+ urlencode () { python -c "import sys, urllib.parse as ul; sys.stdout.write(ul.quote_plus('$1'))"; }
533515
534516 USER=$(jsonkey AccessKeyId)
535517 USER=$(urlencode $USER)
655637 - command : expansions.update
656638 params :
657639 updates :
658- - key : python
659- value : " /opt/mongodbtoolchain/v4/bin/python3"
660640 - key : resmoke_dir
661641 value : " src/resmoke"
662642 - key : resmoke_venv_dir
0 commit comments