guix-commits
[Top][All Lists]
Advanced

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

65/163: gnu: kicad: Wrap with the new Guix PYTHONPATH.


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

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

commit 78cf68c8945dd0af429d5acce575b00b0546a238
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 00:48:12 2021 -0500

    gnu: kicad: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/engineering.scm (kicad): Delete trailing #t.  Import the 
(guix
    build python-build-system) module.
    [phases]{wrap-program}: Wrap with the new Guix PYTHONPATH.
---
 gnu/packages/engineering.scm | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 3b8bcd9..f6c99be 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -903,7 +904,12 @@ Emacs).")
        (file-name (git-file-name name version))))
     (build-system cmake-build-system)
     (arguments
-     `(#:out-of-source? #t
+     `(#:imported-modules ,(cons '(guix build python-build-system)
+                                 %cmake-build-system-modules)
+       #:modules ((guix build cmake-build-system)
+                  ((guix build python-build-system) #:prefix python:)
+                  (guix build utils))
+       #:out-of-source? #t
        #:tests? #f                      ; no tests
        #:build-type "Release"
        #:configure-flags
@@ -915,26 +921,18 @@ Emacs).")
          (add-after 'install 'install-translations
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (copy-recursively (assoc-ref inputs "kicad-i18n")
-                               (assoc-ref outputs "out"))
-             #t))
+                               (assoc-ref outputs "out"))))
          (add-after 'install 'wrap-program
            ;; Ensure correct Python at runtime.
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (python (assoc-ref inputs "python"))
                     (file (string-append out "/bin/kicad"))
-                    (path (string-append
-                           out
-                           "/lib/python"
-                           ,(version-major+minor
-                             (package-version python))
-                           "/site-packages:"
-                           (getenv "PYTHONPATH"))))
+                    (pythonpath (python:guix-pythonpath inputs))
+                    (site (python:site-packages inputs outputs)))
                (wrap-program file
-                 `("PYTHONPATH" ":" prefix (,path))
-                 `("PATH" ":" prefix
-                   (,(string-append python "/bin:")))))
-             #t)))))
+                 `(,pythonpath ":" prefix (,site ,(getenv pythonpath)))
+                 `("PATH" ":" prefix (,(string-append python "/bin:"))))))))))
     (native-search-paths
      (list (search-path-specification
             (variable "KICAD")          ; to find kicad-doc



reply via email to

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