20846: Python package build uses one specific Python version
authorBrett Smith <brett.smith@curii.com>
Thu, 4 Jan 2024 22:45:44 +0000 (17:45 -0500)
committerBrett Smith <brett.smith@curii.com>
Thu, 4 Jan 2024 22:45:44 +0000 (17:45 -0500)
This is meant to prevent all kinds of weird problems that can arise if
`python3` ever stops being the same version that we used to build the
package.

Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>

build/run-library.sh

index 17ac4586a067b597a2f4981fa366881390f2f90d..883219d67cfcb90f34f86bc635154be01065b848 100755 (executable)
@@ -694,8 +694,7 @@ fpm_build_virtualenv_worker () {
     ARVADOS_BUILDING_ITERATION=1
   fi
 
-  local python=$PYTHON3_EXECUTABLE
-  pip=pip3
+  local python="python$PYTHON3_VERSION"
   PACKAGE_PREFIX=$PYTHON3_PKG_PREFIX
 
   if [[ "$PKG" != "arvados-docker-cleaner" ]]; then
@@ -715,7 +714,7 @@ fpm_build_virtualenv_worker () {
     exit 1
   fi
 
-  local venv_py="$venv_dir/bin/python3"
+  local venv_py="$venv_dir/bin/$python"
   if ! "$venv_py" -m pip install --upgrade $DASHQ_UNLESS_DEBUG $CACHE_FLAG pip setuptools wheel; then
     printf "Error, unable to upgrade pip, setuptools, and wheel with
   %s -m pip install --upgrade $DASHQ_UNLESS_DEBUG $CACHE_FLAG pip setuptools wheel