guix-commits
[Top][All Lists]
Advanced

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

102/163: gnu: asymptote: Wrap with the new Guix PYTHONPATH.


From: guix-commits
Subject: 102/163: gnu: asymptote: Wrap with the new Guix PYTHONPATH.
Date: Mon, 25 Jan 2021 02:01:44 -0500 (EST)

apteryx pushed a commit to branch cu/farewell-to-pythonpath
in repository guix.

commit 12ceae38b1b22183dcc6016eddbfd4d5459e6e1c
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 23:45:38 2021 -0500

    gnu: asymptote: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/plotutils.scm (asymptote)[phases]: Delete trailing #t.
    [phases]{wrap-python-script}: Wrap with the new Guix PYTHONPATH.
---
 gnu/packages/plotutils.scm | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm
index f23b567..645b400 100644
--- a/gnu/packages/plotutils.scm
+++ b/gnu/packages/plotutils.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016, 2017, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -251,9 +251,11 @@ colors, styles, options and details.")
     (arguments
      `(#:modules ((guix build emacs-utils)
                   (guix build gnu-build-system)
+                  ((guix build python-build-system) #:select (guix-pythonpath))
                   (guix build utils)
                   (srfi srfi-26))
        #:imported-modules (,@%gnu-build-system-modules
+                           (guix build python-build-system)
                            (guix build emacs-utils))
        #:configure-flags
        (list (string-append "--enable-gc=" (assoc-ref %build-inputs "libgc"))
@@ -280,21 +282,18 @@ colors, styles, options and details.")
              (substitute* "doc/png/Makefile.in"
                (("(\\$\\(infodir\\))/asymptote" _ infodir) infodir))
              (substitute* "doc/asymptote.texi"
-               (("asymptote/asymptote") "asymptote"))
-             #t))
+               (("asymptote/asymptote") "asymptote"))))
          (add-before 'build 'patch-pdf-viewer
            (lambda _
              ;; Default to a free pdf viewer.
              (substitute* "settings.cc"
                (("defaultPDFViewer=\"acroread\"")
-                "defaultPDFViewer=\"gv\""))
-             #t))
+                "defaultPDFViewer=\"gv\""))))
          (add-before 'check 'set-HOME
            ;; Some tests require write access to $HOME, otherwise leading to
            ;; "failed to create directory /homeless-shelter/.asy" error.
            (lambda _
-             (setenv "HOME" "/tmp")
-             #t))
+             (setenv "HOME" "/tmp")))
          (add-after 'install 'install-Emacs-data
            (lambda* (#:key outputs #:allow-other-keys)
              ;; Install related Emacs libraries into an appropriate location.
@@ -302,16 +301,14 @@ colors, styles, options and details.")
                     (lisp-dir (string-append out "/share/emacs/site-lisp")))
                (for-each (cut install-file <> lisp-dir)
                          (find-files "." "\\.el$"))
-               (emacs-generate-autoloads ,name lisp-dir))
-             #t))
+               (emacs-generate-autoloads ,name lisp-dir))))
          (add-after 'install-Emacs-data 'wrap-python-script
            (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; Make sure 'xasy' runs with the correct PYTHONPATH.
              (let* ((out (assoc-ref outputs "out"))
-                    (path (getenv "PYTHONPATH")))
+                    (pythonpath (guix-pythonpath inputs)))
                (wrap-program (string-append out "/share/asymptote/GUI/xasy.py")
-                 `("PYTHONPATH" ":" prefix (,path))))
-             #t)))))
+                 `(,pythonpath ":" prefix (,(getenv pythonpath))))))))))
     (home-page "http://asymptote.sourceforge.net";)
     (synopsis "Script-based vector graphics language")
     (description



reply via email to

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