gnu: python-apsw: Update to 3.40.0.0.

* gnu/packages/databases.scm (python-apsw): Update to 3.40.0.0.
[source]: Remove obsolete patch.
[build-system]: Use pyproject-build-system.
[native-inputs]: Add python-cython.
[arguments]: Move build-extensions phase before build phase.
* gnu/local.mk (dist_patch_DATA): Remove patch.
* gnu/packages/patches/python-apsw-3.39.2.1-test-fix.patch: Remove file.
This commit is contained in:
Ricardo Wurmus 2022-12-10 22:04:41 +01:00
parent 08b9e29d46
commit 2f1d8fb129
No known key found for this signature in database
GPG key ID: 197A5888235FACAC
3 changed files with 18 additions and 46 deletions

View file

@ -1719,7 +1719,6 @@ dist_patch_DATA = \
%D%/packages/patches/python-3-fix-tests.patch \
%D%/packages/patches/python-3-hurd-configure.patch \
%D%/packages/patches/python-3-no-static-lib.patch \
%D%/packages/patches/python-apsw-3.39.2.1-test-fix.patch \
%D%/packages/patches/python-aionotify-0.2.0-py3.8.patch \
%D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \
%D%/packages/patches/python-cross-compile.patch \

View file

@ -173,6 +173,7 @@ (define-module (gnu packages databases)
#:use-module (guix build-system go)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (guix build-system qt)
#:use-module (guix build-system ruby)
@ -3590,7 +3591,7 @@ (define-public python-pickleshare
(define-public python-apsw
(package
(name "python-apsw")
(version "3.39.2.1")
(version "3.40.0.0")
;; The compressed release has fetching functionality disabled.
(source
(origin
@ -3600,24 +3601,23 @@ (define-public python-apsw
version "/apsw-" version ".zip"))
(sha256
(base32
"06x3qgg71xz8l3kz8gz04wkfp5f6zfrg476a4mm1c5hikqyw6ykj"))
;; Cherry-picked from upstream, remove when bumping to 3.39.3.
(patches
(search-patches "python-apsw-3.39.2.1-test-fix.patch"))))
(build-system python-build-system)
(native-inputs (list unzip))
(inputs (list sqlite-next)) ;SQLite 3.39 required.
"02sgja00azvd08wi2wm105apmhp2644s7aw9b1zdg3dkcwjnsiad"))))
(build-system pyproject-build-system)
(native-inputs
(list python-cython unzip))
(inputs (list sqlite-next)) ;SQLite 3.40 required.
(arguments
(list #:phases
#~(modify-phases %standard-phases
(replace 'build
(lambda _
(invoke "python" "setup.py" "build" "--enable-all-extensions"
"--enable=load_extension")))
(add-after 'build 'build-test-helper
(lambda _
(invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
"-I." "-Isqlite3" "src/testextension.c"))))))
(list
#:phases
#~(modify-phases %standard-phases
(add-before 'build 'build-extensions
(lambda _
(invoke "python" "setup.py" "build" "--enable-all-extensions"
"--enable=load_extension")))
(add-after 'build 'build-test-helper
(lambda _
(invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
"-I." "-Isqlite3" "src/testextension.c"))))))
(home-page "https://github.com/rogerbinns/apsw/")
(synopsis "Another Python SQLite Wrapper")
(description

View file

@ -1,27 +0,0 @@
From 1111f902075169bd0d96cdd10607ef8499f0fed5 Mon Sep 17 00:00:00 2001
From: Roger Binns <rogerb@rogerbinns.com>
Date: Mon, 5 Sep 2022 07:12:25 -0700
Subject: [PATCH] Deal with mismatched SQLITE_ENABLE_COLUMN_METADATA
Address #363
---
apsw/tests.py | 2 +-
1 files changed, 1 insertions(+), 1 deletion(-)
diff --git a/apsw/tests.py b/apsw/tests.py
index b4a94d3..256ead0 100644
--- a/apsw/tests.py
+++ b/apsw/tests.py
@@ -772,8 +772,8 @@ class APSW(unittest.TestCase):
c.execute("drop table foo; create table foo (%s)" % (", ".join(["[%s] %s" % (n, t) for n, t in cols]), ))
c.execute("insert into foo([x a space]) values(1)")
c.execute("create temp table two(fred banana); insert into two values(7); create temp view three as select fred as [a space] from two")
- has_full=any(o=="ENABLE_COLUMN_METADATA" or o.startswith("ENABLE_COLUMN_METADATA=") for o in apsw.compile_options)
+ has_full=any(o=="ENABLE_COLUMN_METADATA" or o.startswith("ENABLE_COLUMN_METADATA=") for o in apsw.compile_options) if apsw.using_amalgamation else hasattr(c, "description_full")
for row in c.execute("select * from foo"):
self.assertEqual(cols, c.getdescription())
self.assertEqual(has_full, hasattr(c, "description_full"))
base-commit: f628374c5857d940067ef26c9ea4e85a08a94f76
--
2.37.2