Use python3 pip module instead of pip binary

Focal only provides a pip3 binary, no pip3.8. Instead of working around
that with a symlink, use the module instead.

Add version information output for this variant.

Change-Id: I7af194ecc40e4d43c10ce067a661bb6ab4ca37d4
diff --git a/files/debs/general b/files/debs/general
index 2d8cd80..4bf1ff4 100644
--- a/files/debs/general
+++ b/files/debs/general
@@ -27,6 +27,7 @@
 pkg-config
 psmisc
 python3-dev
+python3-pip
 python3-venv
 tar
 tcpdump
diff --git a/files/rpms/general b/files/rpms/general
index 303510c..c42ce52 100644
--- a/files/rpms/general
+++ b/files/rpms/general
@@ -24,6 +24,7 @@
 postgresql-devel  # psycopg2
 psmisc
 python3-devel
+python3-pip
 redhat-rpm-config # missing dep for gcc hardening flags, see rhbz#1217376
 systemd-devel # for systemd-python
 tar
diff --git a/inc/python b/inc/python
index dd77296..08f9959 100644
--- a/inc/python
+++ b/inc/python
@@ -174,7 +174,7 @@
         if python3_enabled; then
             echo "Using python $PYTHON3_VERSION to install $package_dir because python3_enabled=True"
             sudo_pip="$sudo_pip LC_ALL=en_US.UTF-8"
-            cmd_pip=$(get_pip_command $PYTHON3_VERSION)
+            cmd_pip="python$PYTHON3_VERSION -m pip"
         else
             echo "Using python $PYTHON2_VERSION to install $package_dir because python3_enabled=False"
             cmd_pip=$(get_pip_command $PYTHON2_VERSION)
@@ -217,7 +217,7 @@
         local sudo_pip="sudo -H"
         if python3_enabled; then
             sudo_pip="$sudo_pip LC_ALL=en_US.UTF-8"
-            cmd_pip=$(get_pip_command $PYTHON3_VERSION)
+            cmd_pip="python$PYTHON3_VERSION -m pip"
         else
             cmd_pip=$(get_pip_command $PYTHON2_VERSION)
         fi
diff --git a/tools/install_pip.sh b/tools/install_pip.sh
index 5eb538c..517669e 100755
--- a/tools/install_pip.sh
+++ b/tools/install_pip.sh
@@ -5,7 +5,7 @@
 # Update pip and friends to a known common version
 
 # Assumptions:
-# - if USE_PYTHON3=True, PYTHON3_VERSION refers to a version already installed
+# - PYTHON3_VERSION refers to a version already installed
 
 set -o errexit
 
@@ -53,6 +53,8 @@
     else
         echo "pip: Not Installed"
     fi
+    # Show python3 module version
+    python${PYTHON3_VERSION} -m pip --version
 }
 
 
@@ -125,7 +127,14 @@
 # Show starting versions
 get_versions
 
-# Do pip
+if [[ -n $PYPI_ALTERNATIVE_URL ]]; then
+    configure_pypi_alternative_url
+fi
+
+# Just use system pkgs on Focal
+if [[ "$DISTRO" == focal ]]; then
+    exit 0
+fi
 
 # Eradicate any and all system packages
 
@@ -143,10 +152,6 @@
 
 install_get_pip
 
-if [[ -n $PYPI_ALTERNATIVE_URL ]]; then
-    configure_pypi_alternative_url
-fi
-
 set -x
 
 # Note setuptools is part of requirements.txt and we want to make sure