This is an automated email from the git hooks/post-receive script.

guix_mirror_bot pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 39fa898ce63 gnu: python-tabulate: Add custom 'wrap phase to reduce 
closure size.
39fa898ce63 is described below

commit 39fa898ce63efad6a320fb1ef2a59f9a6ee258b2
Author: Sören Tempel <[email protected]>
AuthorDate: Fri Oct 16 21:06:25 2026 +0200

    gnu: python-tabulate: Add custom 'wrap phase to reduce closure size.
    
    This reduces the closure size by roughly 50%.
    
    Before:
    
            $ guix size python-tabulate
            total: 301.8 MiB
    
    After:
    
            $ guix size python-tabulate
            total: 165.4 MiB
    
    * gnu/packages/python-xyz.scm (python-tabulate)[arguments]: Add
    a custom 'wrap phase.
---
 gnu/packages/python-xyz.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 820aed0b90b..43d8ef0e576 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -38761,6 +38761,20 @@ install @code{python-pandas}.")
        (sha256
         (base32 "0g4b0qnbw55igbpxfxzciqvb6w8ncw4gmcgyq0lyavcnylmv3580"))))
     (build-system pyproject-build-system)
+    (arguments
+     (list
+       #:phases
+       #~(modify-phases %standard-phases
+           ;; This package provides a 'tabulate' executable that does not
+           ;; depend on its native-inputs.  Thus, customize the wrap phase to
+           ;; avoid adding pytest and friends in order to save closure size.
+           ;;
+           ;; See: <https://bugs.gnu.org/25235>.
+           (replace 'wrap
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (wrap-program (in-vicinity #$output "/bin/tabulate")
+                                    `("GUIX_PYTHONPATH" ":" suffix
+                                      ,(list (site-packages inputs 
outputs)))))))))
     (native-inputs
      (list python-pytest
            python-setuptools-scm

Reply via email to