Skip to content

Commit e688ead

Browse files
Build Python 3.13 wheels
1 parent 658afe4 commit e688ead

File tree

4 files changed

+29
-9
lines changed

4 files changed

+29
-9
lines changed

.github/workflows/packages.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: Build packages
33
on:
4+
- push
45
- workflow_dispatch
56

67

@@ -27,6 +28,7 @@ jobs:
2728
- name: Upload artifacts
2829
uses: actions/upload-artifact@v4
2930
with:
31+
name: sdist-${{ matrix.package_name }}
3032
path: |
3133
dist/*.tar.gz
3234
@@ -64,7 +66,7 @@ jobs:
6466
matrix:
6567
platform: [manylinux, musllinux]
6668
arch: [x86_64, i686, aarch64, ppc64le]
67-
pyver: [cp37, cp38, cp39, cp310, cp311, cp312]
69+
pyver: [cp38, cp39, cp310, cp311, cp312, cp313]
6870

6971
runs-on: ubuntu-latest
7072
steps:
@@ -81,7 +83,7 @@ jobs:
8183
key: libpq-${{ env.LIBPQ_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}
8284

8385
- name: Build wheels
84-
uses: pypa/cibuildwheel@v2.16.2
86+
uses: pypa/cibuildwheel@v2.21.2
8587
env:
8688
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
8789
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
@@ -110,6 +112,7 @@ jobs:
110112
111113
- uses: actions/upload-artifact@v4
112114
with:
115+
name: linux-${{matrix.pyver}}-${{matrix.platform}}_${{matrix.arch}}
113116
path: ./wheelhouse/*.whl
114117

115118
services:
@@ -128,30 +131,45 @@ jobs:
128131
129132
130133
build-macos:
131-
runs-on: macos-latest
134+
runs-on: macos-${{ matrix.macver }}
132135
if: true
133136

134137
strategy:
135138
fail-fast: false
136139
matrix:
137140
# These archs require an Apple M1 runner: [arm64, universal2]
138141
arch: [x86_64]
139-
pyver: [cp37, cp38, cp39, cp310, cp311, cp312]
142+
pyver: [cp38, cp39, cp310, cp311, cp312, cp313]
143+
macver: ["12"]
144+
include:
145+
- arch: arm64
146+
pyver: cp310
147+
macver: "14"
148+
- arch: arm64
149+
pyver: cp311
150+
macver: "14"
151+
- arch: arm64
152+
pyver: cp312
153+
macver: "14"
154+
- arch: arm64
155+
pyver: cp313
156+
macver: "14"
140157

141158
steps:
142159
- name: Checkout repos
143160
uses: actions/checkout@v4
144161

145162
- name: Build wheels
146-
uses: pypa/cibuildwheel@v2.16.2
163+
uses: pypa/cibuildwheel@v2.21.2
147164
env:
148165
CIBW_BUILD: ${{matrix.pyver}}-macosx_${{matrix.arch}}
149-
CIBW_ARCHS_MACOS: x86_64
166+
CIBW_ARCHS_MACOS: ${{matrix.arch}}
150167
CIBW_BEFORE_ALL_MACOS: ./scripts/build/wheel_macos_before_all.sh
151168
CIBW_TEST_COMMAND: >-
152169
export PYTHONPATH={project} &&
153170
python -c "import tests; tests.unittest.main(defaultTest='tests.test_suite')"
154171
CIBW_ENVIRONMENT: >-
172+
MACOSX_DEPLOYMENT_TARGET=${{ matrix.macver }}.0
155173
PG_VERSION=16
156174
PACKAGE_NAME=psycopg2-binary
157175
PSYCOPG2_TESTDB=postgres
@@ -161,4 +179,5 @@ jobs:
161179
- name: Upload artifacts
162180
uses: actions/upload-artifact@v4
163181
with:
182+
name: macos-${{matrix.pyver}}-macos-${{matrix.macver}}_${{matrix.arch}}
164183
path: ./wheelhouse/*.whl

scripts/build/build_libpq.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ case "$ID" in
3535

3636
alpine)
3737
apk upgrade
38-
apk add --no-cache zlib-dev krb5-dev linux-pam-dev openldap-dev
38+
apk add --no-cache zlib-dev krb5-dev linux-pam-dev openldap-dev openssl-dev
3939
;;
4040

4141
*)

scripts/build/wheel_macos_before_all.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1212
prjdir="$( cd "${dir}/../.." && pwd )"
1313

1414
brew install gnu-sed postgresql@${PG_VERSION}
15+
brew link --overwrite postgresql@${PG_VERSION}
1516

1617
# Start the database for testing
17-
brew services start postgresql
18+
brew services start postgresql@${PG_VERSION}
1819

1920
# Wait for postgres to come up
2021
for i in $(seq 10 -1 0); do

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ def is_py_64():
552552
url="https://psycopg.org/",
553553
license="LGPL with exceptions",
554554
platforms=["any"],
555-
python_requires='>=3.7',
555+
python_requires='>=3.8',
556556
description=readme.split("\n")[0],
557557
long_description="\n".join(readme.split("\n")[2:]).lstrip(),
558558
classifiers=[x for x in classifiers.split("\n") if x],

0 commit comments

Comments
 (0)