From: Edgar Ramírez-Mondragón Date: Thu, 8 Aug 2024 17:44:37 +0000 (-0600) Subject: ci: build Python 3.13 wheels X-Git-Tag: 3.2.2~1^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6e2018819ab8a83a4a3afedfed6f8a7d98ea0cb0;p=thirdparty%2Fpsycopg.git ci: build Python 3.13 wheels Related: https://github.com/psycopg/psycopg/issues/889 --- diff --git a/.github/workflows/packages-bin.yml b/.github/workflows/packages-bin.yml index b7836d550..d875b4fe2 100644 --- a/.github/workflows/packages-bin.yml +++ b/.github/workflows/packages-bin.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ec87e5450..a7cb38998 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: | diff --git a/tools/build/build_macos_arm64.sh b/tools/build/build_macos_arm64.sh index df6aa589c..3013efe7f 100755 --- a/tools/build/build_macos_arm64.sh +++ b/tools/build/build_macos_arm64.sh @@ -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"