Subject: [bug#32102] [PATCH v2 1/2] build-system: python: Only wrap non-hidden executable files.

From: Arun Isaac <[email-masked]>
Date: Thu, 12 Jul 2018 00:56:51 +0530

* guix/build/python-build-system.scm (wrap): Only wrap non-hidden executable
files. This prevents wrapped executables from being wrapped once again.
---
 guix/build/python-build-system.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index 376ea81f1..37e35eec0 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2015, 2018 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2016 Hartmut Goebel <[email-masked]>
 ;;; Copyright © 2018 Ricardo Wurmus <[email-masked]>
+;;; Copyright © 2018 Arun Isaac <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -189,7 +190,11 @@ when running checks after installing the package."
     (map (cut string-append dir "/" <>)
          (or (scandir dir (lambda (f)
                             (let ((s (stat (string-append dir "/" f))))
-                              (eq? 'regular (stat:type s)))))
+                              (and (eq? 'regular (stat:type s))
+                                   ;; Only wrap non-hidden files. This
+                                   ;; prevents wrapped executables from being
+                                   ;; wrapped again.
+                                   (not (string-prefix? "." f))))))
              '())))
 
   (define bindirs
-- 
2.15.1