guix-commits
[Top][All Lists]
Advanced

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

51/163: gnu: scanmem: Wrap with the new Guix PYTHONPATH.


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

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

commit 10de06582ba0f65f685a1fd40335a902078e45d6
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jan 22 23:55:34 2021 -0500

    gnu: scanmem: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/debug.scm (scanmem): Delete trailing #t.
    [phases]{wrap-gameconqueror}: Use the new Guix PYTHONPATH.
---
 gnu/packages/debug.scm            | 19 +++++++++++--------
 gnu/packages/display-managers.scm | 18 ++++++++++++------
 2 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index b3a000e..e3017e5 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -496,7 +496,12 @@ input.  Zzuf's behaviour is deterministic, making it easy 
to reproduce bugs.")
          "17p8sh0rj8yqz36ria5bp48c8523zzw3y9g8sbm2jwq7sc27i7s9"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags '("--enable-gui")
+     `(#:imported-modules ,(cons '(guix build python-build-system)
+                                 %gnu-build-system-modules)
+       #:modules ((guix build gnu-build-system)
+                  ((guix build python-build-system) #:select (guix-pythonpath))
+                  (guix build utils))
+       #:configure-flags '("--enable-gui")
        #:phases
        (modify-phases %standard-phases
          (add-before 'configure 'hardcode-python
@@ -504,17 +509,15 @@ input.  Zzuf's behaviour is deterministic, making it easy 
to reproduce bugs.")
              (substitute* "gui/GameConqueror.py"
                (("/usr/bin/env python")
                 (string-append (assoc-ref %build-inputs
-                                          "python-wrapper") "/bin/python")))
-             #t))
+                                          "python-wrapper") "/bin/python")))))
          (add-after 'install 'wrap-gameconqueror
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out               (assoc-ref outputs "out"))
                    (gi-typelib-path   (getenv "GI_TYPELIB_PATH"))
-                   (python-path       (getenv "PYTHONPATH")))
+                   (pythonpath        (guix-pythonpath inputs)))
                (wrap-program (string-append out 
"/share/gameconqueror/GameConqueror.py")
-                 `("GI_TYPELIB_PATH"        ":" prefix (,gi-typelib-path))
-                 `("PYTHONPATH"             ":" prefix (,python-path))))
-             #t)))))
+                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
+                 `(,pythonpath ":" prefix (,(getenv pythonpath))))))))))
     (native-inputs
      `(("libtool" ,libtool)
        ("python-wrapper" ,python-wrapper)
diff --git a/gnu/packages/display-managers.scm 
b/gnu/packages/display-managers.scm
index b6e5ab7..ae954b7 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2020 L  p R n  d n <guix@lprndn.info>
 ;;; Copyright © 2020 Fredrik Salomonsson <plattfot@gmail.com>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -172,7 +173,12 @@ Guix's logo.  Based on Arch linux's archlinux-simplyblack 
theme.")
                 "158zb2d0v1309a8v19hh32y4yj3v6yg4yg6m0l7v59d3a2b7f651"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:parallel-tests? #f ; fails when run in parallel
+     '(#:imported-modules ,(cons '(guix build python-build-system)
+                                 %gnu-build-system-modules)
+       #:modules ((guix build gnu-build-system)
+                  ((guix build python-build-system) #:select (guix-pythonpath))
+                  (guix build utils))
+       #:parallel-tests? #f ; fails when run in parallel
        #:configure-flags
        (list "--localstatedir=/var")
        #:phases
@@ -186,14 +192,14 @@ Guix's logo.  Based on Arch linux's archlinux-simplyblack 
theme.")
                (("/bin/false") (which "false"))
                (("/usr/sbin/nologin") (which "nologin")))
              (substitute* "src/seat.c"
-               (("/bin/sh") (which "sh")))
-             #t))
+               (("/bin/sh") (which "sh")))))
          (add-before 'check 'pre-check
            ;; Run test-suite under a dbus session.
            (lambda* (#:key inputs #:allow-other-keys)
-             (wrap-program "tests/src/test-python-greeter"
-               `("PYTHONPATH"      ":" prefix (,(getenv "PYTHONPATH")))
-               `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
+             (let ((pythonpath (guix-pythonpath inputs)))
+               (wrap-program "tests/src/test-python-greeter"
+                 `(,pythonpath      ":" prefix (,(getenv pythonpath)))
+                 `("GI_TYPELIB_PATH" ":" prefix (,(getenv 
"GI_TYPELIB_PATH")))))
 
              ;; Avoid printing locale warnings, which trip up the text
              ;; matching tests.



reply via email to

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