Browse code

Merge "Always install python3 and its dev package"

Zuul authored on 2020/02/16 01:01:08
Showing 3 changed files
... ...
@@ -456,6 +456,8 @@ function install_python3 {
456 456
         apt_get install python${PYTHON3_VERSION} python${PYTHON3_VERSION}-dev
457 457
     elif is_suse; then
458 458
         install_package python3-devel python3-dbm
459
+    elif is_fedora; then
460
+        install_package python3 python3-devel
459 461
     fi
460 462
 }
461 463
 
... ...
@@ -415,8 +415,11 @@ fi
415 415
 
416 416
 # Ensure python is installed
417 417
 # --------------------------
418
-is_package_installed python || install_package python
418
+install_python3
419 419
 
420
+if ! python3_enabled; then
421
+    is_package_installed python || install_package python
422
+fi
420 423
 
421 424
 # Configure Logging
422 425
 # -----------------
... ...
@@ -142,7 +142,7 @@ export USE_PYTHON3=$(trueorfalse True USE_PYTHON3)
142 142
 # version of Python 3 to this variable will install the app using that
143 143
 # version of the interpreter instead of 2.7.
144 144
 _DEFAULT_PYTHON3_VERSION="$(_get_python_version python3)"
145
-export PYTHON3_VERSION=${PYTHON3_VERSION:-${_DEFAULT_PYTHON3_VERSION:-3.5}}
145
+export PYTHON3_VERSION=${PYTHON3_VERSION:-${_DEFAULT_PYTHON3_VERSION:-3.6}}
146 146
 
147 147
 # Just to be more explicit on the Python 2 version to use.
148 148
 _DEFAULT_PYTHON2_VERSION="$(_get_python_version python2)"