]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
chore: upgrade binary dependencies to libpq 15.0, openssl 1.1.1r
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 25 Oct 2022 14:58:23 +0000 (16:58 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 25 Oct 2022 17:44:21 +0000 (19:44 +0200)
.github/workflows/packages.yml
docs/news.rst
tools/build/build_libpq.sh
tools/build/build_macos_arm64.sh

index fcef42550bf0b8ac80f62e7db1215e955c183b1b..cd288e751feec7e183ce0010feeb3f0fd46db466 100644 (file)
@@ -81,8 +81,8 @@ jobs:
     runs-on: ubuntu-latest
 
     env:
-      LIBPQ_VERSION: "14.4"
-      OPENSSL_VERSION: "1.1.1q"
+      LIBPQ_VERSION: "15.0"
+      OPENSSL_VERSION: "1.1.1r"
 
     strategy:
       fail-fast: false
index e4b1de4249fd77e2cc3b5353af3df5c4b9bc3f8e..18d82b4ec7bb879397d08e45c1e219840b815b26 100644 (file)
@@ -15,6 +15,7 @@ Psycopg 3.1.4 (unreleased)
 
 - Include :ref:`error classes <sqlstate-exceptions>` defined in PostgreSQL 15.
 - Add support for Python 3.11 (:ticket:`#305`).
+- Build binary packages with libpq from PostgreSQL 15.0.
 
 
 Current release
index 612439fea70b4282cc762c13147d2fbdd1b47cdf..4cc79af2d941196df457d5cf6c759d6aff049bf1 100755 (executable)
@@ -7,10 +7,10 @@ set -x
 
 # Last release: https://www.postgresql.org/ftp/source/
 # IMPORTANT! Change the cache key in packages.yml when upgrading libraries
-postgres_version="${LIBPQ_VERSION:-14.4}"
+postgres_version="${LIBPQ_VERSION:-15.0}"
 
 # last release: https://www.openssl.org/source/
-openssl_version="${OPENSSL_VERSION:-1.1.1q}"
+openssl_version="${OPENSSL_VERSION:-1.1.1r}"
 
 # last release: https://openldap.org/software/download/
 ldap_version="2.6.3"
index 17f48846ddf484761e17c3b17f418fce14152340..f8c2fd75e1a36f860e6c6b4ec58be5f4527ed384 100755 (executable)
@@ -11,7 +11,7 @@ set -euo pipefail
 set -x
 
 python_versions="3.8.10 3.9.13 3.10.5 3.11.0"
-postgres_version=14
+pg_version=15
 
 # Move to the root of the project
 dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@@ -35,17 +35,26 @@ else
     eval "$(/opt/homebrew/bin/brew shellenv)"
 fi
 
+export PGDATA=/opt/homebrew/var/postgresql@${pg_version}
+
 # Install PostgreSQL, if necessary
 command -v pg_config > /dev/null || (
-    brew install postgresql@${postgres_version}
-    # Currently not working
-    # brew services start postgresql@${postgres_version}
-    pg_ctl \
-        -D /opt/homebrew/var/postgresql@${postgres_version} \
-        -l /opt/homebrew/var/log/postgresql@${postgres_version}.log \
-        start
+    brew install postgresql@${pg_version}
 )
 
+# After PostgreSQL 15, the bin path is not in the path.
+export PATH=$(ls -d1 /opt/homebrew/Cellar/postgresql@${pg_version}/*/bin):$PATH
+
+# Make sure the server is running
+
+# Currently not working
+# brew services start postgresql@${pg_version}
+
+if ! pg_ctl status; then
+    pg_ctl -l /opt/homebrew/var/log/postgresql@${pg_version}.log start
+fi
+
+
 # Install the Python versions we want to build
 for ver3 in $python_versions; do
     ver2=$(echo $ver3 | sed 's/\([^\.]*\)\(\.[^\.]*\)\(.*\)/\1\2/')
@@ -78,7 +87,7 @@ export CIBW_TEST_COMMAND="pytest {project}/tests -m 'not slow and not flakey' --
 
 export PSYCOPG_IMPL=binary
 export PSYCOPG_TEST_DSN="dbname=postgres"
-export PSYCOPG_TEST_WANT_LIBPQ_BUILD=">= ${postgres_version}"
-export PSYCOPG_TEST_WANT_LIBPQ_IMPORT=">= ${postgres_version}"
+export PSYCOPG_TEST_WANT_LIBPQ_BUILD=">= ${pg_version}"
+export PSYCOPG_TEST_WANT_LIBPQ_IMPORT=">= ${pg_version}"
 
 cibuildwheel psycopg_binary