18766: Merge branch 'main' into 18766-package-building-dockerfile-tweaks
[arvados.git] / build / run-build-packages.sh
index 06328f82929eabda497684a8c15a84c5f834eb71..23cf81bd70246a473d12751ba99ee028ec5ec6a3 100755 (executable)
@@ -20,9 +20,9 @@ Options:
 --target <target>
     Distribution to build packages for (default: debian10)
 --only-build <package>
-    Build only a specific package (or $ONLY_BUILD from environment)
+    Build only a specific package (or ONLY_BUILD from environment)
 --arch <arch>
-    Build a specific architecture (or $ARCH from environment, defaults to native architecture)
+    Build a specific architecture (or ARCH from environment, defaults to native architecture)
 --force-build
     Build even if the package exists upstream or if it has already been
     built locally
@@ -108,7 +108,8 @@ fi
 
 declare -a PYTHON3_BACKPORTS
 
-PYTHON3_VERSION=$(python3 -c 'import sys; print("{v.major}.{v.minor}".format(v=sys.version_info))')
+PYTHON3_EXECUTABLE=python3
+PYTHON3_VERSION=$($PYTHON3_EXECUTABLE -c 'import sys; print("{v.major}.{v.minor}".format(v=sys.version_info))')
 
 ## These defaults are suitable for any Debian-based distribution.
 # You can customize them as needed in distro sections below.
@@ -122,6 +123,13 @@ case "$TARGET" in
     debian*)
         FORMAT=deb
         ;;
+    ubuntu1804)
+        FORMAT=deb
+        PYTHON3_EXECUTABLE=python3.8
+        PYTHON3_VERSION=$($PYTHON3_EXECUTABLE -c 'import sys; print("{v.major}.{v.minor}".format(v=sys.version_info))')
+        PYTHON3_PACKAGE=python$PYTHON3_VERSION
+        PYTHON3_INSTALL_LIB=lib/python$PYTHON3_VERSION/dist-packages
+        ;;
     ubuntu*)
         FORMAT=deb
         ;;