]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci(alpine): install missing libraris required to test and package wheels
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 29 Aug 2025 15:11:54 +0000 (17:11 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 2 Sep 2025 22:24:39 +0000 (00:24 +0200)
Since some recent alpine version the krb5-libs package is not installed by
default anymore. When building the libpq the package got installed as a
side effect of installing krb5-dev, but, in case libpq build was cached,
the libraries would have been missing when packaging the wheel or
importing psycopg for test.

tools/ci/build_libpq.sh

index 7aeabe15c1c8f15c62c0ca11fa0b962194cab770..4d05bd503d2c789116803bbe9d20d8b4712a13fe 100755 (executable)
@@ -35,11 +35,20 @@ case "$(uname)" in
         ;;
 esac
 
+# Install packages required for test and wheels build, regardless of whether
+# we will build the libpq or not.
+case "$ID" in
+    alpine)
+        apk add --no-cache tzdata krb5-libs
+        ;;
+esac
+
 if [[ -f "${LIBPQ_BUILD_PREFIX}/lib/libpq.${library_suffix}" ]]; then
     echo "libpq already available: build skipped" >&2
     exit 0
 fi
 
+# Install packages required to build the libpq.
 case "$ID" in
     centos)
         yum update -y
@@ -49,7 +58,7 @@ case "$ID" in
     alpine)
         apk upgrade
         apk add --no-cache flex krb5-dev linux-pam-dev openldap-dev \
-            openssl-dev tzdata zlib-dev
+            openssl-dev zlib-dev
         ;;
 
     macos)