guix-commits
[Top][All Lists]
Advanced

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

66/163: gnu: volk: Wrap with the new Guix PYTHONPATH.


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

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

commit b19c00cd316aebf7d99271df49a229e05517b775
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 00:50:59 2021 -0500

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

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index f6c99be..4c86047 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1169,7 +1169,12 @@ the 'showing the effect of'-style of operation.")
         (base32 "1mkqiw0i2fbbsk46zvk8yv5swl7ifhq6y1dlfphq8dsmkvxckqby"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:phases
+     `(#: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))
+       #:phases
        (modify-phases %standard-phases
          (add-after 'install 'remove-static-libraries
            ;; Remove libcpu_features.a (and any others that might appear).
@@ -1177,25 +1182,18 @@ the 'showing the effect of'-style of operation.")
              (let* ((out (assoc-ref outputs "out"))
                     (lib (string-append out "/lib")))
                (for-each delete-file (find-files lib "\\.a$"
-                                                 #:fail-on-error? #t))
-               #t)))
+                                                 #:fail-on-error? #t)))))
          (add-after 'install 'wrap-pythonpath
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (python (assoc-ref inputs "python"))
                     (file (string-append out "/bin/volk_modtool"))
-                    (path (string-append
-                           out
-                           "/lib/python"
-                           ,(version-major+minor
-                             (package-version python))
-                           "/site-packages:"
-                           (getenv "PYTHONPATH"))))
+                    (site (python:site-packages inputs outputs))
+                    (pythonpath (python:guix-pythonpath inputs)))
                (wrap-program file
-                 `("PYTHONPATH" ":" prefix (,path))
+                 `(,pythonpath ":" prefix (,site ,(getenv pythonpath)))
                  `("PATH" ":" prefix
-                   (,(string-append python "/bin:")))))
-             #t)))))
+                   (,(string-append python "/bin:"))))))))))
     (inputs
      `(("boost" ,boost)
        ("python" ,python-wrapper)



reply via email to

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