File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 162162python_version=$( python3 -c ' import sys;print("{0}{1}".format(*(sys.version_info[:2])))' )
163163PYTHON_VENV_DIR=" $( dirname " $PWD " ) /python3-env"
164164if [ " $python_version " -ge 311 ] || [ -f " $PYTHON_VENV_DIR /bin/activate" ]; then
165- python3 -c " import venv" > /dev/null 2>&1 || {
165+ if ! ( python3 -c " import venv" > /dev/null 2>&1 ) || ! (python3 -c " import ensurepip " > /dev/null 2>&1 ) ; then
166166 case " $PM " in
167167 zypper)
168168 if ! (sudo " $PM " " ${INSTALL_OPTION[@]} " " python3-venvctrl" ); then
@@ -175,7 +175,7 @@ if [ "$python_version" -ge 311 ] || [ -f "$PYTHON_VENV_DIR/bin/activate" ]; then
175175 fi
176176 ;;
177177 esac
178- }
178+ fi
179179 echo " Creating python3 virtual env"
180180 python3 -m venv --system-site-packages " $PYTHON_VENV_DIR " || {
181181 echo " Failed to upgrade python3 virtual env, clear and recreate"
You can’t perform that action at this time.
0 commit comments