Date: Tue, 1 Nov 2022 11:25:07 GMT From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 561c2dbebb6f - main - databases/py-sqlite3: fix build with python 3.11 Message-ID: <202211011125.2A1BP7la047534@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=561c2dbebb6fd1c52a580de6846de686a1b743c4 commit 561c2dbebb6fd1c52a580de6846de686a1b743c4 Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2022-11-01 11:20:26 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2022-11-01 11:24:35 +0000 databases/py-sqlite3: fix build with python 3.11 While here, add a simple smoke test which catches this kind of problems and silence stripping. PR: 265537 Submitted by: loader@FreeBSD.org Approved by: maintainer timeout (2+ months) --- databases/py-sqlite3/Makefile | 5 ++++- databases/py-sqlite3/files/setup3.py | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/databases/py-sqlite3/Makefile b/databases/py-sqlite3/Makefile index 168a5f8cbb0d..8baa11da345c 100644 --- a/databases/py-sqlite3/Makefile +++ b/databases/py-sqlite3/Makefile @@ -35,6 +35,9 @@ post-extract: .endif post-install: - ${STRIP_CMD} ${STAGEDIR}${PYTHON_LIBDIR}/lib-dynload/_sqlite3*.so + @${STRIP_CMD} ${STAGEDIR}${PYTHON_LIBDIR}/lib-dynload/_sqlite3*.so + +do-test: + @${PYTHON_CMD} -c 'import sqlite3' # minimal smoke test .include <bsd.port.post.mk> diff --git a/databases/py-sqlite3/files/setup3.py b/databases/py-sqlite3/files/setup3.py index 7407503ceb54..944c89920852 100644 --- a/databases/py-sqlite3/files/setup3.py +++ b/databases/py-sqlite3/files/setup3.py @@ -35,6 +35,9 @@ major, minor = map(int, platform.python_version_tuple()[:2]) if (major, minor) <= (3, 10): sqlite_srcs.append('_sqlite/cache.c',) +if (major, minor) >= (3, 11): + sqlite_srcs.append('_sqlite/blob.c',) + try: import ctypes ctypes.CDLL('libsqlite3.so').sqlite3_load_extension
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202211011125.2A1BP7la047534>