guix_mirror_bot pushed a commit to branch python-team
in repository guix.

commit bb0d4c09e66d30b2686c2ae5771ae9c2e3cea231
Author: Sharlatan Hellseher <sharlata...@gmail.com>
AuthorDate: Sat Jun 28 21:19:04 2025 +0100

    gnu: gandi.cli: Improve package.
    
    * gnu/packages/networking.scm (gandi.cli): Apply G-expressions.
    [build-system]: Use pyproject.
    [arguments]: Remove trailing #t from lambdas.
    [native-inputs]: Remove python-docutils and python-tox; add
    python-docutils-0.19, python-setuptools, and python-wheel.
    
    Change-Id: I1dc1c0a51d26fa48153c11c1bc656b0b000d37fd
---
 gnu/packages/networking.scm | 59 ++++++++++++++++++++++++++-------------------
 1 file changed, 34 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index f6e72709a9..ffe43a885c 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -99,6 +99,7 @@
   #:use-module (guix build-system meson)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system pyproject)
   #:use-module (guix build-system qt)
   #:use-module (guix build-system trivial)
   #:use-module (guix utils)
@@ -173,6 +174,7 @@
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-web)
@@ -2022,34 +2024,41 @@ round-robin fashion.")
        (uri (pypi-uri name version))
        (sha256
         (base32 "1h36jahbp7273wn3yd747kbiwjc0bm3sja67bcxdsd54ln0vyndg"))))
-    (build-system python-build-system)
+    (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'embed-store-file-names
-           (lambda _
-             (substitute* (list "gandi/cli/modules/cert.py"
-                                "gandi/cli/tests/commands/test_certificate.py")
-               (("openssl") (which "openssl")))
-             #t))
-         (add-after 'install 'install-documentation
-           ;; The included man page may be outdated but we install it anyway,
-           ;; since it's mentioned in 'gandi --help' and better than nothing.
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out  (assoc-ref outputs "out"))
-                    (man1 (string-append out "/share/man/man1")))
-               (mkdir-p man1)
-               (with-output-to-file (string-append man1 "/gandi.1")
-                 (lambda _
-                   (invoke "rst2man.py" "gandicli.man.rst")))
-               #t))))))
+     (list
+      #:test-flags
+      #~(list "--pyargs" "gandi.cli")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'embed-store-file-names
+            (lambda _
+              (substitute* (list "gandi/cli/modules/cert.py"
+                                 
"gandi/cli/tests/commands/test_certificate.py")
+                (("openssl") (which "openssl")))))
+          (add-after 'install 'install-documentation
+            ;; The included man page may be outdated but we install it anyway,
+            ;; since it's mentioned in 'gandi --help' and better than nothing.
+            (lambda _
+              (let* ((man1 (string-append #$output "/share/man/man1")))
+                (mkdir-p man1)
+                (with-output-to-file (string-append man1 "/gandi.1")
+                  (lambda _
+                    (invoke "rst2man.py" "gandicli.man.rst")))))))))
     (native-inputs
-     (list python-docutils ; for rst2man.py
-           python-pytest python-pytest-cov python-tox))
-    (propagated-inputs
-     (list openssh))           ; used by gandi/cli/modules/iass.py
+     (list python-docutils-0.19
+           python-pytest
+           python-pytest-cov
+           python-setuptools
+           python-wheel))
     (inputs
-     (list openssl python-click-7 python-ipy python-pyyaml python-requests))
+     (list openssl
+           python-click-7
+           python-ipy
+           python-pyyaml
+           python-requests))
+    (propagated-inputs
+     (list openssh))
     (home-page "https://cli.gandi.net";)
     (synopsis "Command-line interface to the Gandi.net Web API")
     (description

Reply via email to