mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-14 13:06:34 +03:00
Build Python 3.13 wheels
This commit is contained in:
parent
658afe4cd9
commit
a59079a4f2
30
.github/workflows/packages.yml
vendored
30
.github/workflows/packages.yml
vendored
|
@ -27,6 +27,7 @@ jobs:
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: sdist-${{ matrix.package_name }}
|
||||||
path: |
|
path: |
|
||||||
dist/*.tar.gz
|
dist/*.tar.gz
|
||||||
|
|
||||||
|
@ -64,7 +65,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [manylinux, musllinux]
|
platform: [manylinux, musllinux]
|
||||||
arch: [x86_64, i686, aarch64, ppc64le]
|
arch: [x86_64, i686, aarch64, ppc64le]
|
||||||
pyver: [cp37, cp38, cp39, cp310, cp311, cp312]
|
pyver: [cp38, cp39, cp310, cp311, cp312, cp313]
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -81,7 +82,7 @@ jobs:
|
||||||
key: libpq-${{ env.LIBPQ_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}
|
key: libpq-${{ env.LIBPQ_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
uses: pypa/cibuildwheel@v2.16.2
|
uses: pypa/cibuildwheel@v2.21.2
|
||||||
env:
|
env:
|
||||||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
|
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
|
||||||
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
|
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
|
||||||
|
@ -110,6 +111,7 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: linux-${{matrix.pyver}}-${{matrix.platform}}_${{matrix.arch}}
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@ -128,7 +130,7 @@ jobs:
|
||||||
|
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
runs-on: macos-latest
|
runs-on: macos-${{ matrix.macver }}
|
||||||
if: true
|
if: true
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -136,22 +138,37 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
# These archs require an Apple M1 runner: [arm64, universal2]
|
# These archs require an Apple M1 runner: [arm64, universal2]
|
||||||
arch: [x86_64]
|
arch: [x86_64]
|
||||||
pyver: [cp37, cp38, cp39, cp310, cp311, cp312]
|
pyver: [cp38, cp39, cp310, cp311, cp312, cp313]
|
||||||
|
macver: ["12"]
|
||||||
|
include:
|
||||||
|
- arch: arm64
|
||||||
|
pyver: cp310
|
||||||
|
macver: "14"
|
||||||
|
- arch: arm64
|
||||||
|
pyver: cp311
|
||||||
|
macver: "14"
|
||||||
|
- arch: arm64
|
||||||
|
pyver: cp312
|
||||||
|
macver: "14"
|
||||||
|
- arch: arm64
|
||||||
|
pyver: cp313
|
||||||
|
macver: "14"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repos
|
- name: Checkout repos
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
uses: pypa/cibuildwheel@v2.16.2
|
uses: pypa/cibuildwheel@v2.21.2
|
||||||
env:
|
env:
|
||||||
CIBW_BUILD: ${{matrix.pyver}}-macosx_${{matrix.arch}}
|
CIBW_BUILD: ${{matrix.pyver}}-macosx_${{matrix.arch}}
|
||||||
CIBW_ARCHS_MACOS: x86_64
|
CIBW_ARCHS_MACOS: ${{matrix.arch}}
|
||||||
CIBW_BEFORE_ALL_MACOS: ./scripts/build/wheel_macos_before_all.sh
|
CIBW_BEFORE_ALL_MACOS: ./scripts/build/wheel_macos_before_all.sh
|
||||||
CIBW_TEST_COMMAND: >-
|
CIBW_TEST_COMMAND: >-
|
||||||
export PYTHONPATH={project} &&
|
export PYTHONPATH={project} &&
|
||||||
python -c "import tests; tests.unittest.main(defaultTest='tests.test_suite')"
|
python -c "import tests; tests.unittest.main(defaultTest='tests.test_suite')"
|
||||||
CIBW_ENVIRONMENT: >-
|
CIBW_ENVIRONMENT: >-
|
||||||
|
MACOSX_DEPLOYMENT_TARGET=${{ matrix.macver }}.0
|
||||||
PG_VERSION=16
|
PG_VERSION=16
|
||||||
PACKAGE_NAME=psycopg2-binary
|
PACKAGE_NAME=psycopg2-binary
|
||||||
PSYCOPG2_TESTDB=postgres
|
PSYCOPG2_TESTDB=postgres
|
||||||
|
@ -161,4 +178,5 @@ jobs:
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: macos-${{matrix.pyver}}-macos-${{matrix.macver}}_${{matrix.arch}}
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
|
|
|
@ -35,7 +35,7 @@ case "$ID" in
|
||||||
|
|
||||||
alpine)
|
alpine)
|
||||||
apk upgrade
|
apk upgrade
|
||||||
apk add --no-cache zlib-dev krb5-dev linux-pam-dev openldap-dev
|
apk add --no-cache zlib-dev krb5-dev linux-pam-dev openldap-dev openssl-dev
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -12,9 +12,10 @@ dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
prjdir="$( cd "${dir}/../.." && pwd )"
|
prjdir="$( cd "${dir}/../.." && pwd )"
|
||||||
|
|
||||||
brew install gnu-sed postgresql@${PG_VERSION}
|
brew install gnu-sed postgresql@${PG_VERSION}
|
||||||
|
brew link --overwrite postgresql@${PG_VERSION}
|
||||||
|
|
||||||
# Start the database for testing
|
# Start the database for testing
|
||||||
brew services start postgresql
|
brew services start postgresql@${PG_VERSION}
|
||||||
|
|
||||||
# Wait for postgres to come up
|
# Wait for postgres to come up
|
||||||
for i in $(seq 10 -1 0); do
|
for i in $(seq 10 -1 0); do
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -552,7 +552,7 @@ setup(name="psycopg2",
|
||||||
url="https://psycopg.org/",
|
url="https://psycopg.org/",
|
||||||
license="LGPL with exceptions",
|
license="LGPL with exceptions",
|
||||||
platforms=["any"],
|
platforms=["any"],
|
||||||
python_requires='>=3.7',
|
python_requires='>=3.8',
|
||||||
description=readme.split("\n")[0],
|
description=readme.split("\n")[0],
|
||||||
long_description="\n".join(readme.split("\n")[2:]).lstrip(),
|
long_description="\n".join(readme.split("\n")[2:]).lstrip(),
|
||||||
classifiers=[x for x in classifiers.split("\n") if x],
|
classifiers=[x for x in classifiers.split("\n") if x],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user