guix-commits
[Top][All Lists]
Advanced

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

44/163: gnu: kaldi-gstreamer-server: Wrap with the new Guix PYTHONPATH.


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

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

commit 02dcf0416e30accde8b641ce7c1bbd80315a6adc
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jan 22 23:16:25 2021 -0500

    gnu: kaldi-gstreamer-server: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/machine-learning.scm (kaldi-gstreamer-server): Import the 
(guix
    build python-build-system) module.
    [phases]: Delete trailing #t.
    {install}: Wrap with the new Guix PYTHONPATH.
---
 gnu/packages/machine-learning.scm | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/machine-learning.scm 
b/gnu/packages/machine-learning.scm
index 7a77897..c5d2e1d 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1325,8 +1325,11 @@ automatically.")
       (build-system gnu-build-system)
       (arguments
        `(#:tests? #f ; there are no tests that can be run automatically
+         #:imported-modules ,(cons '(guix build python-build-system)
+                                   %gnu-build-system-modules)
          #:modules ((guix build utils)
                     (guix build gnu-build-system)
+                    ((guix build python-build-system) #:select 
(guix-pythonpath))
                     (srfi srfi-26))
          #:phases
          (modify-phases %standard-phases
@@ -1351,8 +1354,7 @@ automatically.")
                                       "-m" "compileall"
                                       "-f" ; force rebuild
                                       ,file)))
-                           (find-files "." "\\.py$")))
-               #t))
+                           (find-files "." "\\.py$")))))
            (replace 'install
              (lambda* (#:key inputs outputs #:allow-other-keys)
                (let* ((out (assoc-ref outputs "out"))
@@ -1372,7 +1374,7 @@ automatically.")
                  (let* ((server (string-append bin "/kaldi-gst-server"))
                         (client (string-append bin "/kaldi-gst-client"))
                         (worker (string-append bin "/kaldi-gst-worker"))
-                        (PYTHONPATH (getenv "PYTHONPATH"))
+                        (pythonpath (guix-pythonpath inputs))
                         (GST_PLUGIN_PATH (string-append
                                           (assoc-ref inputs 
"gst-kaldi-nnet2-online")
                                           
"/lib/gstreamer-1.0:${GST_PLUGIN_PATH}"))
@@ -1381,18 +1383,18 @@ automatically.")
                                   (lambda _
                                     (format #t
                                             "#!~a
-export PYTHONPATH=~a
+export ~a=~a
 export GST_PLUGIN_PATH=~a
 exec ~a ~a/~a \"$@\"~%"
-                                            (which "bash") PYTHONPATH 
GST_PLUGIN_PATH
+                                            (which "bash") pythonpath
+                                            (getenv pythonpath) GST_PLUGIN_PATH
                                             (which "python") share what)))
                                 (chmod wrapper #o555))))
                    (for-each wrap
                              (list server client worker)
                              (list "master_server.py"
                                    "client.py"
-                                   "worker.py")))
-                 #t))))))
+                                   "worker.py")))))))))
       (inputs
        `(("gst-kaldi-nnet2-online" ,gst-kaldi-nnet2-online)
          ("python" ,python-wrapper)



reply via email to

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