]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci: build Python 3.13 wheels
authorEdgar Ramírez-Mondragón <edgarrm358@gmail.com>
Thu, 8 Aug 2024 17:44:37 +0000 (11:44 -0600)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 15 Sep 2024 11:38:28 +0000 (13:38 +0200)
Related: https://github.com/psycopg/psycopg/issues/889

.github/workflows/packages-bin.yml
.github/workflows/tests.yml
tools/build/build_macos_arm64.sh

index b7836d550a2bcf430296ebc301c8ad6a738e1bae..d875b4fe2073ad7b7d63f2ce4bed769eb169b9be 100644 (file)
@@ -21,7 +21,7 @@ jobs:
       fail-fast: false
       matrix:
         arch: [x86_64, i686, ppc64le, aarch64]
-        pyver: [cp38, cp39, cp310, cp311, cp312]
+        pyver: [cp38, cp39, cp310, cp311, cp312, cp313]
         platform: [manylinux, musllinux]
 
     steps:
@@ -103,7 +103,7 @@ jobs:
       fail-fast: false
       matrix:
         arch: [arm64]
-        pyver: [cp310, cp311, cp312]
+        pyver: [cp310, cp311, cp312, cp313]
 
     env:
       PG_VERSION: "16"
@@ -155,7 +155,7 @@ jobs:
       matrix:
         # These archs require an Apple M1 runner: [arm64, universal2]
         arch: [x86_64]
-        pyver: [cp38, cp39, cp310, cp311, cp312]
+        pyver: [cp38, cp39, cp310, cp311, cp312, cp313]
 
     env:
       PG_VERSION: "16"
@@ -207,7 +207,7 @@ jobs:
       matrix:
         # Might want to add win32, untested at the moment.
         arch: [win_amd64]
-        pyver: [cp38, cp39, cp310, cp311, cp312]
+        pyver: [cp38, cp39, cp310, cp311, cp312, cp313]
 
     steps:
       - uses: actions/checkout@v4
index ec87e545004f494ed9326fdf16ff1851571252a0..a7cb38998b1728f25969106575d9a520a61db279 100644 (file)
@@ -31,12 +31,14 @@ jobs:
           - {impl: python, python: "3.10", postgres: "postgres:14"}
           - {impl: python, python: "3.11", postgres: "postgres:15", libpq: master}
           - {impl: python, python: "3.12", postgres: "postgres:16", libpq: oldest}
+          - {impl: python, python: "3.13", postgres: "postgres:16"}
 
           - {impl: c, python: "3.8", postgres: "postgres:16", libpq: newest}
           - {impl: c, python: "3.9", postgres: "postgres:14", libpq: master}
           - {impl: c, python: "3.10", postgres: "postgres:15"}
           - {impl: c, python: "3.11", postgres: "postgres:12", libpq: oldest}
           - {impl: c, python: "3.12", postgres: "postgres:11", libpq: newest}
+          - {impl: c, python: "3.13", postgres: "postgres:15"}
 
           - {impl: python, python: "3.8", ext: gevent, postgres: "postgres:16"}
           - {impl: c, python: "3.12", ext: gevent, postgres: "postgres:14"}
@@ -70,6 +72,7 @@ jobs:
       - uses: actions/setup-python@v5
         with:
           python-version: ${{ matrix.python }}
+          allow-prereleases: true
 
       - name: Start PostgreSQL service
         # Note: this would love to be a service, but I don't see a way to pass
@@ -150,9 +153,11 @@ jobs:
           - {impl: python, python: "3.10"}
           - {impl: python, python: "3.11"}
           - {impl: python, python: "3.12"}
+          - {impl: python, python: "3.13"}
           - {impl: c, python: "3.10"}
           - {impl: c, python: "3.11"}
           - {impl: c, python: "3.12"}
+          - {impl: c, python: "3.13"}
 
     env:
       PSYCOPG_IMPL: ${{ matrix.impl }}
@@ -170,6 +175,7 @@ jobs:
       - uses: actions/setup-python@v5
         with:
           python-version: ${{ matrix.python }}
+          allow-prereleases: true
 
       - name: Install PostgreSQL on the runner
         run: brew install postgresql@${PG_VERSION}
@@ -260,11 +266,13 @@ jobs:
           - {impl: python, python: "3.10"}
           - {impl: python, python: "3.11"}
           - {impl: python, python: "3.12"}
+          - {impl: python, python: "3.13"}
           - {impl: c, python: "3.8"}
           - {impl: c, python: "3.9"}
           - {impl: c, python: "3.10"}
           - {impl: c, python: "3.11"}
           - {impl: c, python: "3.12"}
+          - {impl: c, python: "3.13"}
 
     env:
       PSYCOPG_IMPL: ${{ matrix.impl }}
@@ -283,6 +291,7 @@ jobs:
       - uses: actions/setup-python@v5
         with:
           python-version: ${{ matrix.python }}
+          allow-prereleases: true
 
       - name: Start PostgreSQL service
         run: |
index df6aa589ca8847a15c1b72c962f1b6b69597d68c..3013efe7f384e5debc5cb7c390fd19192ab161ef 100755 (executable)
@@ -9,7 +9,7 @@
 
 set -euo pipefail
 
-python_versions="3.8.10 3.9.13 3.10.11 3.11.6 3.12.0"
+python_versions="3.8.19 3.9.19 3.10.14 3.11.9 3.12.5 3.13.0rc1"
 pg_version=16
 
 function log {
@@ -62,14 +62,19 @@ fi
 
 
 # Install the Python versions we want to build
-for ver3 in $python_versions; do
+for ver_full in $python_versions; do
+    # Get the major.minor.patch version, without pre-release markers
+    ver3=$(echo $ver_full | sed 's/\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/')
+
+    # Get the major.minor version
     ver2=$(echo $ver3 | sed 's/\([^\.]*\)\(\.[^\.]*\)\(.*\)/\1\2/')
+
     command -v python${ver2} > /dev/null || (
-        log "installing Python $ver3"
+        log "installing Python $ver_full"
         (cd /tmp &&
             curl -fsSl -O \
-                https://www.python.org/ftp/python/${ver3}/python-${ver3}-macos11.pkg)
-        sudo installer -pkg /tmp/python-${ver3}-macos11.pkg -target /
+                https://www.python.org/ftp/python/${ver3}/python-${ver_full}-macos11.pkg)
+        sudo installer -pkg /tmp/python-${ver_full}-macos11.pkg -target /
     )
 done
 
@@ -92,7 +97,7 @@ python tools/build/copy_to_binary.py
 # Build the binary packages
 export CIBW_PLATFORM=macos
 export CIBW_ARCHS=arm64
-export CIBW_BUILD='cp{38,39,310,311,312}-*'
+export CIBW_BUILD='cp{38,39,310,311,312,313}-*'
 export CIBW_TEST_REQUIRES="./psycopg[test] ./psycopg_pool"
 export CIBW_TEST_COMMAND="pytest {project}/tests -m 'not slow and not flakey' --color yes"