GNU bug report logs - #57587
[PATCH] gnu: python-apsw: Update to 3.39.2.1.

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Mon, 5 Sep 2022 02:46:02 UTC

Severity: normal

Tags: patch

Done: Marius Bakke <marius <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57587 in the body.
You can then email your comments to 57587 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#57587; Package guix-patches. (Mon, 05 Sep 2022 02:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hilton Chain <hako <at> ultrarare.space>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 05 Sep 2022 02:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: python-apsw: Update to 3.39.2.1.
Date: Mon, 05 Sep 2022 10:45:11 +0800
From 71d63d8824c860becb8975c63c6438ca437c168d Mon Sep 17 00:00:00 2001
From: Hilton Chain <hako <at> ultrarare.space>
Date: Mon, 5 Sep 2022 10:38:19 +0800
Subject: [PATCH] gnu: python-apsw: Update to 3.39.2.1.

* gnu/packages/databases.scm (python-apsw): Update to 3.39.2.1.
[arguments]: Use bundled Makefile.
---
 gnu/packages/databases.scm | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 7edf0fed2d..741e582264 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -3568,7 +3568,7 @@ (define-public python-pickleshare
 (define-public python-apsw
   (package
     (name "python-apsw")
-    (version "3.39.2.0")
+    (version "3.39.2.1")
     (source
      (origin
        (method git-fetch)
@@ -3578,20 +3578,23 @@ (define-public python-apsw
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0q7fnk8n3m5mpjzh6xyhj409k8sacdbjsfis98my9c50fdn5sr7y"))))
+         "1pdlmzyn0xnks4iwd99crralpbnli78c28zh000ha8dz4qbr0nsv"))))
     (build-system python-build-system)
     (inputs (list sqlite-next))         ;SQLite 3.39 required.
     (arguments
      (list #:phases
            #~(modify-phases %standard-phases
-               (replace 'build
+               (add-before 'build 'disable-fetch
                  (lambda _
-                   (invoke "python" "setup.py" "build" "--enable-all-extensions"
-                           "--enable=load_extension")))
-               (add-after 'build 'build-test-helper
+                   (substitute* "Makefile"
+                     (("fetch.*--all") ""))))
+               (replace 'build
                  (lambda _
-                   (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
-                           "-I." "-Isqlite3" "src/testextension.c"))))))
+                   (invoke "make" "build_ext")))
+               (replace 'check
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     (invoke "make" "test")))))))
     (home-page "https://github.com/rogerbinns/apsw/")
     (synopsis "Another Python SQLite Wrapper")
     (description

base-commit: d22a5c18517d662516fc93889534367fd3a448f2
-- 
2.37.2





Information forwarded to guix-patches <at> gnu.org:
bug#57587; Package guix-patches. (Mon, 05 Sep 2022 06:12:02 GMT) Full text and rfc822 format available.

Message #8 received at 57587 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 57587 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: python-apsw: Update to 3.39.2.1.
Date: Mon, 05 Sep 2022 14:11:11 +0800
From 5bcc29595eefa3632c4ac3ed9e77d8c5a3a7765d Mon Sep 17 00:00:00 2001
From: Hilton Chain <hako <at> ultrarare.space>
Date: Mon, 5 Sep 2022 10:45:11 +0800
Subject: [PATCH v2] gnu: python-apsw: Update to 3.39.2.1.

* gnu/packages/databases.scm (python-apsw): Update to 3.39.2.1.
[arguments]: Use bundled Makefile.
---
v1 -> v2: Enable parallel compilation.

 gnu/packages/databases.scm | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 7edf0fed2d..70e8c2d6b9 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -3568,7 +3568,7 @@ (define-public python-pickleshare
 (define-public python-apsw
   (package
     (name "python-apsw")
-    (version "3.39.2.0")
+    (version "3.39.2.1")
     (source
      (origin
        (method git-fetch)
@@ -3578,20 +3578,25 @@ (define-public python-apsw
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0q7fnk8n3m5mpjzh6xyhj409k8sacdbjsfis98my9c50fdn5sr7y"))))
+         "1pdlmzyn0xnks4iwd99crralpbnli78c28zh000ha8dz4qbr0nsv"))))
     (build-system python-build-system)
     (inputs (list sqlite-next))         ;SQLite 3.39 required.
     (arguments
      (list #:phases
            #~(modify-phases %standard-phases
-               (replace 'build
+               (add-before 'build 'disable-fetch
                  (lambda _
-                   (invoke "python" "setup.py" "build" "--enable-all-extensions"
-                           "--enable=load_extension")))
-               (add-after 'build 'build-test-helper
+                   (substitute* "Makefile"
+                     (("fetch.*--all") ""))))
+               (replace 'build
                  (lambda _
-                   (invoke "gcc" "-fPIC" "-shared" "-o" "./testextension.sqlext"
-                           "-I." "-Isqlite3" "src/testextension.c"))))))
+                   (invoke "make" "-j" (number->string (parallel-job-count))
+                           "build_ext")))
+               (replace 'check
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     (invoke "make" "-j" (number->string (parallel-job-count))
+                             "test")))))))
     (home-page "https://github.com/rogerbinns/apsw/")
     (synopsis "Another Python SQLite Wrapper")
     (description

base-commit: d22a5c18517d662516fc93889534367fd3a448f2
-- 
2.37.2





Information forwarded to guix-patches <at> gnu.org:
bug#57587; Package guix-patches. (Tue, 06 Sep 2022 08:03:01 GMT) Full text and rfc822 format available.

Message #11 received at 57587 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Hilton Chain <hako <at> ultrarare.space>
Cc: 57587 <at> debbugs.gnu.org
Subject: Re: [bug#57587] [PATCH v2] gnu: python-apsw: Update to 3.39.2.1.
Date: Tue, 06 Sep 2022 09:01:22 +0100
[Message part 1 (text/plain, inline)]
Hilton Chain via Guix-patches via <guix-patches <at> gnu.org> writes:

> From 5bcc29595eefa3632c4ac3ed9e77d8c5a3a7765d Mon Sep 17 00:00:00 2001
> From: Hilton Chain <hako <at> ultrarare.space>
> Date: Mon, 5 Sep 2022 10:45:11 +0800
> Subject: [PATCH v2] gnu: python-apsw: Update to 3.39.2.1.
>
> * gnu/packages/databases.scm (python-apsw): Update to 3.39.2.1.
> [arguments]: Use bundled Makefile.
> ---
> v1 -> v2: Enable parallel compilation.
>
>  gnu/packages/databases.scm | 21 +++++++++++++--------
>  1 file changed, 13 insertions(+), 8 deletions(-)

I think this breaks the calibre package on x86_64-linux, could you take
a look at whether it builds for you with this change?

Thanks,

Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#57587; Package guix-patches. (Tue, 06 Sep 2022 10:49:01 GMT) Full text and rfc822 format available.

Message #14 received at 57587 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 57587 <at> debbugs.gnu.org
Subject: Re: [bug#57587] gnu: python-apsw: Update to 3.39.2.1.
Date: Tue, 06 Sep 2022 18:46:17 +0800
On September 6, 2022 4:01:22 PM GMT+08:00, Christopher Baines <mail <at> cbaines.net> wrote:

>I think this breaks the calibre package on x86_64-linux, could you take
>a look at whether it builds for you with this change?

Hi Chris,

Yes, there are test errors regarding the 'enableloadextension' attribute, I'll find it out.

Thanks,
Chain




Information forwarded to guix-patches <at> gnu.org:
bug#57587; Package guix-patches. (Tue, 06 Sep 2022 11:38:02 GMT) Full text and rfc822 format available.

Message #17 received at 57587 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 57587 <at> debbugs.gnu.org
Subject: Re: [bug#57587] gnu: python-apsw: Update to 3.39.2.1.
Date: Tue, 06 Sep 2022 19:35:19 +0800
Just found it's involved by myself in last version... Compressed source actually already had fetching disabled  :‑X




Information forwarded to guix-patches <at> gnu.org:
bug#57587; Package guix-patches. (Tue, 06 Sep 2022 12:55:02 GMT) Full text and rfc822 format available.

Message #20 received at 57587 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 57587 <at> debbugs.gnu.org
Cc: Christopher Baines <mail <at> cbaines.net>
Subject: [PATCH] gnu: python-apsw: Update to 3.39.2.1.
Date: Tue, 06 Sep 2022 20:54:19 +0800
From 95fd5f63cbab6890f7280374f9278fd9811513a3 Mon Sep 17 00:00:00 2001
From: Hilton Chain <hako <at> ultrarare.space>
Date: Tue, 6 Sep 2022 20:30:45 +0800
Subject: [PATCH] gnu: python-apsw: Update to 3.39.2.1.

* gnu/packages/databases.scm (python-apsw): Update to 3.39.2.1.
[source]: Change back to compressed release.
* gnu/packages/patches/python-apsw-3.39.2.1-test-fix.patch: New file.
* gnu/local.mk: Add patch.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/databases.scm                    | 18 ++++++++-----
 .../python-apsw-3.39.2.1-test-fix.patch       | 27 +++++++++++++++++++
 3 files changed, 39 insertions(+), 7 deletions(-)
 create mode 100644 gnu/packages/patches/python-apsw-3.39.2.1-test-fix.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index e454189b8b..19102113c9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1694,6 +1694,7 @@ 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		\
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 7edf0fed2d..9540b61920 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -3568,18 +3568,22 @@ (define-public python-pickleshare
 (define-public python-apsw
   (package
     (name "python-apsw")
-    (version "3.39.2.0")
+    (version "3.39.2.1")
+    ;; The compressed release has fetching functionality disabled.
     (source
      (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/rogerbinns/apsw")
-             (commit version)))
-       (file-name (git-file-name name version))
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/rogerbinns/apsw/releases/download/"
+             version "/apsw-" version ".zip"))
        (sha256
         (base32
-         "0q7fnk8n3m5mpjzh6xyhj409k8sacdbjsfis98my9c50fdn5sr7y"))))
+         "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.
     (arguments
      (list #:phases
diff --git a/gnu/packages/patches/python-apsw-3.39.2.1-test-fix.patch b/gnu/packages/patches/python-apsw-3.39.2.1-test-fix.patch
new file mode 100644
index 0000000000..cc233e3ccd
--- /dev/null
+++ b/gnu/packages/patches/python-apsw-3.39.2.1-test-fix.patch
@@ -0,0 +1,27 @@
+From 1111f902075169bd0d96cdd10607ef8499f0fed5 Mon Sep 17 00:00:00 2001
+From: Roger Binns <rogerb <at> 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

base-commit: 7ae51b741a6b73d3b2730389ed5291e00d7e5c0a
-- 
2.37.2





Information forwarded to guix-patches <at> gnu.org:
bug#57587; Package guix-patches. (Tue, 06 Sep 2022 13:00:02 GMT) Full text and rfc822 format available.

Message #23 received at 57587 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 57587 <at> debbugs.gnu.org
Cc: Christopher Baines <mail <at> cbaines.net>
Subject: [PATCH v3] gnu: python-apsw: Update to 3.39.2.1.
Date: Tue, 06 Sep 2022 20:59:08 +0800
From 95fd5f63cbab6890f7280374f9278fd9811513a3 Mon Sep 17 00:00:00 2001
From: Hilton Chain <hako <at> ultrarare.space>
Date: Tue, 6 Sep 2022 20:30:45 +0800

* gnu/packages/databases.scm (python-apsw): Update to 3.39.2.1.
[source]: Change back to compressed release.
* gnu/packages/patches/python-apsw-3.39.2.1-test-fix.patch: New file.
* gnu/local.mk: Add patch.
---
Oops! Previous mail has a bad format, resend. \>_</
v2 -> v3: Calibre compiles now.

 gnu/local.mk                                  |  1 +
 gnu/packages/databases.scm                    | 18 ++++++++-----
 .../python-apsw-3.39.2.1-test-fix.patch       | 27 +++++++++++++++++++
 3 files changed, 39 insertions(+), 7 deletions(-)
 create mode 100644 gnu/packages/patches/python-apsw-3.39.2.1-test-fix.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index e454189b8b..19102113c9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1694,6 +1694,7 @@ 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		\
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 7edf0fed2d..9540b61920 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -3568,18 +3568,22 @@ (define-public python-pickleshare
 (define-public python-apsw
   (package
     (name "python-apsw")
-    (version "3.39.2.0")
+    (version "3.39.2.1")
+    ;; The compressed release has fetching functionality disabled.
     (source
      (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/rogerbinns/apsw")
-             (commit version)))
-       (file-name (git-file-name name version))
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/rogerbinns/apsw/releases/download/"
+             version "/apsw-" version ".zip"))
        (sha256
         (base32
-         "0q7fnk8n3m5mpjzh6xyhj409k8sacdbjsfis98my9c50fdn5sr7y"))))
+         "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.
     (arguments
      (list #:phases
diff --git a/gnu/packages/patches/python-apsw-3.39.2.1-test-fix.patch b/gnu/packages/patches/python-apsw-3.39.2.1-test-fix.patch
new file mode 100644
index 0000000000..cc233e3ccd
--- /dev/null
+++ b/gnu/packages/patches/python-apsw-3.39.2.1-test-fix.patch
@@ -0,0 +1,27 @@
+From 1111f902075169bd0d96cdd10607ef8499f0fed5 Mon Sep 17 00:00:00 2001
+From: Roger Binns <rogerb <at> 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

base-commit: 7ae51b741a6b73d3b2730389ed5291e00d7e5c0a
--
2.37.2




Reply sent to Marius Bakke <marius <at> gnu.org>:
You have taken responsibility. (Wed, 07 Sep 2022 17:17:02 GMT) Full text and rfc822 format available.

Notification sent to Hilton Chain <hako <at> ultrarare.space>:
bug acknowledged by developer. (Wed, 07 Sep 2022 17:17:02 GMT) Full text and rfc822 format available.

Message #28 received at 57587-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: Hilton Chain <hako <at> ultrarare.space>, 57587-done <at> debbugs.gnu.org
Cc: Christopher Baines <mail <at> cbaines.net>
Subject: Re: [bug#57587] [PATCH v3] gnu: python-apsw: Update to 3.39.2.1.
Date: Wed, 07 Sep 2022 19:16:06 +0200
[Message part 1 (text/plain, inline)]
Hilton Chain via Guix-patches via <guix-patches <at> gnu.org> skriver:

> * gnu/packages/databases.scm (python-apsw): Update to 3.39.2.1.
> [source]: Change back to compressed release.
> * gnu/packages/patches/python-apsw-3.39.2.1-test-fix.patch: New file.
> * gnu/local.mk: Add patch.

Applied, thanks!
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 06 Oct 2022 11:24:15 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 214 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.