guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: gnu: python-invoke: Delete incompatible and unused code.


From: guix-commits
Subject: 01/03: gnu: python-invoke: Delete incompatible and unused code.
Date: Sun, 21 Nov 2021 17:36:21 -0500 (EST)

rekado pushed a commit to branch core-updates-frozen
in repository guix.

commit 72876fb02d27425747c2bae8d0f1b2e73a945d31
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Sun Nov 21 23:34:32 2021 +0100

    gnu: python-invoke: Delete incompatible and unused code.
    
    * gnu/packages/python-xyz.scm (python-invoke)[arguments]: Add build phase
    'delete-python2-code.
    (python2-invoke)[arguments]: Remove that phase and add 'delete-python3-code.
---
 gnu/packages/python-xyz.scm | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f7189e0..244e8ca 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17862,14 +17862,15 @@ projects.")
      `(#:tests? #f
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'delete-python2-code
+           (lambda _
+             (delete-file-recursively "invoke/vendor/yaml2")))
          (add-after 'unpack 'fix-bash-path
            (lambda* (#:key inputs #:allow-other-keys)
              (let ((bash (assoc-ref inputs "bash")))
                (substitute* "invoke/config.py"
                  (("shell = \"/bin/bash\"")
-                  (string-append "shell = \"" bash "/bin/bash\""))
-                 )
-               #t))))))
+                  (string-append "shell = \"" bash "/bin/bash\"")))))))))
     (inputs
      `(("bash" ,bash-minimal)))
     (synopsis "Pythonic task execution")
@@ -17881,7 +17882,17 @@ instead of servers and network commands.")
     (license license:bsd-3)))
 
 (define-public python2-invoke
-  (package-with-python2 python-invoke))
+  (let ((parent (package-with-python2 python-invoke)))
+    (package
+      (inherit parent)
+      (arguments
+       (substitute-keyword-arguments (package-arguments parent)
+         ((#:phases phases #t)
+          `(modify-phases ,phases
+             (delete 'delete-python2-code)
+             (add-after 'unpack 'delete-python3-code
+               (lambda _
+                 (delete-file-recursively "invoke/vendor/yaml3"))))))))))
 
 (define-public python-automat
   (package



reply via email to

[Prev in Thread] Current Thread [Next in Thread]