guix-patches
[Top][All Lists]
Advanced

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

[bug#70672] ["PATCH core-updates" 1/1] gnu: python: Fix python's idle in


From: Jean-Baptiste Note
Subject: [bug#70672] ["PATCH core-updates" 1/1] gnu: python: Fix python's idle installation.
Date: Tue, 30 Apr 2024 13:44:59 +0000

* gnu/packages/python.scm (python-2.7): Fix idle output for python-2.7.
---
 gnu/packages/python.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index b2757c651e..b41e75ed45 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -345,12 +345,15 @@ (define-public python-2.7
                       (install-file file (dirname target))
                       (delete-file file)))
                   (find-files (string-append out "/bin") "^idle"))
+                 ;; The idlelib directory is in OUT/lib/pythonX.Y, but we
+                 ;; want it under IDLE/lib/pythonX.Y/site-packages.
                  (match (find-files out "^idlelib$" #:directories? #t)
                    ((idlelib)
                     (let* ((len (string-length out))
                            (target (string-append idle "/"
-                                                  (string-drop idlelib len)
-                                                  "/site-packages")))
+                                                  (string-drop
+                                                   (dirname idlelib) len)
+                                                  "/site-packages/idlelib")))
                       (mkdir-p (dirname target))
                       (rename-file idlelib target))))))))
          (add-after 'move-idle 'rebuild-bytecode
-- 
2.41.0






reply via email to

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