We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 704d1e5 commit bf95b81Copy full SHA for bf95b81
util/jenkins/virtualenv_tools.sh
@@ -38,8 +38,16 @@ function create_virtualenv () {
38
# create a unique hash for the job based location of where job is run
39
venvname="$(pwd | md5sum | cut -d' ' -f1)"
40
41
+ if [[ "$@" == *"--python=python3.12"* ]]; then
42
+ # Use python3.12 with -m virtualenv if Python 3.12 is specified
43
+ venv_exec="/opt/python3.12/bin/python3.12 -m virtualenv"
44
+ else
45
+ # Use the system default virtualenv for other Python versions
46
+ venv_exec="virtualenv"
47
+ fi
48
+
49
# create the virtualenv
- virtualenv "$@" "$JOBVENVDIR/$venvname"
50
+ "$venv_exec" "$@" "$JOBVENVDIR/$venvname"
51
52
# This variable is created in global scope if function is sourced
53
# so we can access it after running this function.
0 commit comments