guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 629df7b1e453e8872b6e42465f6c3a32aa348914
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Thu Nov 6 13:01:21 2025 +0000

    gnu: python-duckdb: Move to duckdb.
    
    * gnu/packages/python-xyz.scm (python-duckdb): Move from here ...
    * gnu/packages/duckdb.scm: ... to here.
    
    * gnu/packages/python-science.scm: Add (gnu packages duckdb).
    
    Change-Id: Ic8551cdd64f718e62a12576fbc1a38bf861d1644
---
 gnu/packages/duckdb.scm         | 76 ++++++++++++++++++++++++++++++++++++++---
 gnu/packages/python-science.scm |  1 +
 gnu/packages/python-xyz.scm     | 62 +--------------------------------
 3 files changed, 74 insertions(+), 65 deletions(-)

diff --git a/gnu/packages/duckdb.scm b/gnu/packages/duckdb.scm
index 222c53419b..de7c4e160e 100644
--- a/gnu/packages/duckdb.scm
+++ b/gnu/packages/duckdb.scm
@@ -1,10 +1,10 @@
 ;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023, 2024 Greg Hogan <[email protected]>
+;;; Copyright © 2023, 2025 Ricardo Wurmus <[email protected]>
 ;;; Copyright © 2024 Felix Gruber <[email protected]>
-;;; Copyright © 2024 Greg Hogan <[email protected]>
 ;;; Copyright © 2024 Nicolas Graves <[email protected]>
 ;;; Copyright © 2024, 2025 Ekaitz Zarraga <[email protected]>
-;;; Copyright © 2025 Ricardo Wurmus <[email protected]>
-;;; Copyright © 2025 Sharlatan Hellseher <[email protected]>
+;;; Copyright © 2024, 2025 Sharlatan Hellseher <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,11 +24,18 @@
 (define-module (gnu packages duckdb)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system pyproject)
+  #:use-module ((guix build-system python) #:select (pypi-uri))
+  #:use-module (guix download)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module (guix utils)
-  #:use-module (gnu packages))
+  #:use-module (gnu packages)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages python-build)
+  #:use-module (gnu packages python-science)
+  #:use-module (gnu packages python-xyz))
 
 ;;; Commentary:
 ;;;
@@ -73,6 +80,67 @@ Multi-Version Concurrency Control}.  Data can be stored in 
persistent,
 single-file databases with support for secondary indexes.")
     (license license:expat)))
 
+;; XXX: Try to inherit from duckdb and build from source with all extensions.
+(define-public python-duckdb
+  (package
+    (name "python-duckdb")
+    (version "1.3.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "duckdb" version))
+       (sha256
+        (base32 "1x8zb47y8lzc4w0g013sim8x9vd1h96ra3dd0bvh91y73f5dyn66"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:tests? #f ;FIXME: See <https://codeberg.org/guix/guix/issues/1436>.
+      #:test-flags
+      #~(list "--ignore=tests/slow/test_h2oai_arrow.py"
+              ;; Do not relay on mypy.
+              "--ignore=tests/stubs/test_stubs.py"
+              "-k" (string-append
+                    ;; Don't install anything, thank you.
+                    "not test_install_non_existent_extension"
+                    ;; _pybind11_conduit_v1_ not found.
+                    " and not test_wrap_coverage"
+                    ;; See <https://github.com/duckdb/duckdb/issues/11961>.
+                    " and not test_fetchmany"
+                    ;; See <https://github.com/duckdb/duckdb/issues/10702>.
+                    " and not test_connection_interrupt"
+                    " and not test_query_interruption"))
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; Tests need this
+          (add-before 'check 'set-HOME
+            (lambda _ (setenv "HOME" "/tmp")))
+          ;; Later versions of pybind replace "_" with "const_name".
+          (add-after 'unpack 'pybind-compatibility
+            (lambda _
+              (with-directory-excursion "src/include/duckdb_python"
+                (substitute* '("python_objects.hpp"
+                               "pyfilesystem.hpp"
+                               "pybind11/conversions/pyconnection_default.hpp")
+                  (("const_name") "_"))))))))
+    (propagated-inputs
+     (list python-adbc-driver-manager))
+    (native-inputs
+     (list pybind11
+           python-fsspec
+           ;; python-google-cloud-storage ;python-grpcio fails (see: 
guix/guix#1436)
+           python-numpy
+           python-pandas
+           python-psutil
+           ;; python-pytest
+           python-setuptools-scm
+           python-setuptools
+           python-wheel))
+    (home-page "https://www.duckdb.org";)
+    (synopsis "DuckDB embedded database")
+    (description "DuckDB is an in-process SQL OLAP database management
+system.")
+    (license license:expat)))
+
 ;;;
 ;;; Avoid adding new packages to the end of this file. To reduce the chances
 ;;; of a merge conflict, place them above in alphabetic order.
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 2c4f5fa892..f8d78f61cc 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -70,6 +70,7 @@
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages digest)
+  #:use-module (gnu packages duckdb)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages geo)
   #:use-module (gnu packages graphviz)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 198535bc0a..0720018c92 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -217,6 +217,7 @@
   #:use-module (gnu packages django)
   #:use-module (gnu packages djvu)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages duckdb)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages emulators)
   #:use-module (gnu packages enchant)
@@ -23776,67 +23777,6 @@ runtime (rather than during a preprocessing step).")
 Mustache templating language renderer.")
     (license license:expat)))
 
-;; XXX: Try to inherit from duckdb and build from source with all extensions.
-(define-public python-duckdb
-  (package
-    (name "python-duckdb")
-    (version "1.3.2")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "duckdb" version))
-              (sha256
-               (base32
-                "1x8zb47y8lzc4w0g013sim8x9vd1h96ra3dd0bvh91y73f5dyn66"))))
-    (build-system pyproject-build-system)
-    (arguments
-     (list
-      #:tests? #f ;FIXME: See <https://codeberg.org/guix/guix/issues/1436>.
-      #:test-flags
-      #~(list "--ignore=tests/slow/test_h2oai_arrow.py"
-              ;; Do not relay on mypy.
-              "--ignore=tests/stubs/test_stubs.py"
-              "-k" (string-append
-                    ;; Don't install anything, thank you.
-                    "not test_install_non_existent_extension"
-                    ;; _pybind11_conduit_v1_ not found.
-                    " and not test_wrap_coverage"
-                    ;; See <https://github.com/duckdb/duckdb/issues/11961>.
-                    " and not test_fetchmany"
-                    ;; See <https://github.com/duckdb/duckdb/issues/10702>.
-                    " and not test_connection_interrupt"
-                    " and not test_query_interruption"))
-      #:phases
-      #~(modify-phases %standard-phases
-          ;; Tests need this
-          (add-before 'check 'set-HOME
-            (lambda _ (setenv "HOME" "/tmp")))
-          ;; Later versions of pybind replace "_" with "const_name".
-          (add-after 'unpack 'pybind-compatibility
-            (lambda _
-              (with-directory-excursion "src/include/duckdb_python"
-                (substitute* '("python_objects.hpp"
-                               "pyfilesystem.hpp"
-                               "pybind11/conversions/pyconnection_default.hpp")
-                  (("const_name") "_"))))))))
-    (propagated-inputs
-     (list python-adbc-driver-manager))
-    (native-inputs
-     (list pybind11
-           python-fsspec
-           ;; python-google-cloud-storage ;python-grpcio fails (see: 
guix/guix#1436)
-           python-numpy
-           python-pandas
-           python-psutil
-           ;; python-pytest
-           python-setuptools-scm
-           python-setuptools
-           python-wheel))
-    (home-page "https://www.duckdb.org";)
-    (synopsis "DuckDB embedded database")
-    (description "DuckDB is an in-process SQL OLAP database management
-system.")
-    (license license:expat)))
-
 (define-public python-dulwich
   (package
     (name "python-dulwich")

Reply via email to