diff options
| author | Arun Isaac <arunisaac@systemreboot.net> | 2018-07-11 13:03:33 +0530 | 
|---|---|---|
| committer | Arun Isaac <arunisaac@systemreboot.net> | 2018-11-25 01:31:23 +0530 | 
| commit | 89e7f90d0b40bc4f15f902cc3b82c3effa87dd02 (patch) | |
| tree | 86cb0fc7cfafb0e39a2181fe0bcb15efdb1ad172 /guix | |
| parent | 4ae7dc7b9af64794081b1913740b97acd89c91bc (diff) | |
build-system: python: Do not double wrap executables.
* guix/build/python-build-system.scm (wrap): Only wrap executables that have
not already been wrapped.
* guix/build/utils.scm (wrapper?): New function.
Diffstat (limited to 'guix')
| -rw-r--r-- | guix/build/python-build-system.scm | 9 | ||||
| -rw-r--r-- | guix/build/utils.scm | 9 | 
2 files changed, 13 insertions, 5 deletions
| diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index 5bb0ba49d5..73b554c766 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 <mhw@netris.org>  ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>  ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>  ;;;  ;;; This file is part of GNU Guix.  ;;; @@ -186,11 +187,9 @@ when running checks after installing the package."  (define* (wrap #:key inputs outputs #:allow-other-keys)    (define (list-of-files dir) -    (map (cut string-append dir "/" <>) -         (or (scandir dir (lambda (f) -                            (let ((s (stat (string-append dir "/" f)))) -                              (eq? 'regular (stat:type s))))) -             '()))) +    (find-files dir (lambda (file stat) +                      (and (eq? 'regular (stat:type stat)) +                           (not (wrapper? file))))))    (define bindirs      (append-map (match-lambda diff --git a/guix/build/utils.scm b/guix/build/utils.scm index 5fe3286843..cb5621a5a9 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -3,6 +3,7 @@  ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>  ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>  ;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>  ;;;  ;;; This file is part of GNU Guix.  ;;; @@ -87,6 +88,7 @@              patch-/usr/bin/file              fold-port-matches              remove-store-references +            wrapper?              wrap-program              invoke @@ -1003,6 +1005,13 @@ known as `nuke-refs' in Nixpkgs."                               (put-u8 out (char->integer char))                               result)))))) +(define (wrapper? prog) +  "Return #t if PROG is a wrapper as produced by 'wrap-program'." +  (and (file-exists? prog) +       (let ((base (basename prog))) +         (and (string-prefix? "." base) +              (string-suffix? "-real" base))))) +  (define* (wrap-program prog #:rest vars)    "Make a wrapper for PROG.  VARS should look like this: | 
