guix-commits
[Top][All Lists]
Advanced

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

03/04: gnu: python-wxpython: Use gexps.


From: guix-commits
Subject: 03/04: gnu: python-wxpython: Use gexps.
Date: Wed, 3 May 2023 22:18:05 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit 679dcb403e31c4f7ebec0edbef1ed5690ae79cab
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Wed May 3 21:25:15 2023 -0400

    gnu: python-wxpython: Use gexps.
    
    * gnu/packages/wxwidgets.scm (python-wxpython) [arguments]: Use gexps.
    Provide the '--use_syswx' build option via the WXPYTHON_BUILD_ARGS 
environment
    variable.
---
 gnu/packages/wxwidgets.scm | 43 ++++++++++++++++++++++---------------------
 1 file changed, 22 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm
index cf0fc5b91f..130e695385 100644
--- a/gnu/packages/wxwidgets.scm
+++ b/gnu/packages/wxwidgets.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2023 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2023 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
+;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -282,27 +283,27 @@ and many other languages.")
        (patches (search-patches "python-wxwidgets-type-errors.patch"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'configure
-           (lambda* (#:key inputs #:allow-other-keys)
-             (setenv "WXWIN" (assoc-ref inputs "wxwidgets"))
-             ;; Copy the waf executable to the source directory since it needs
-             ;; to be in a writable directory.
-             (copy-file (search-input-file inputs "/bin/waf")
-                        "bin/waf")
-             (setenv "WAF" "bin/waf")
-             ;; The build script tries to copy license files from the
-             ;; wxwidgets source tree. Prevent it.
-             (substitute* "wscript"
-               (("updateLicenseFiles\\(cfg\\)" all)
-                (string-append "#" all)))
-             ;; The build script tries to write to demo/version.py. So, we set
-             ;; correct write permissions.
-             (chmod "demo/version.py" #o644)
-             ;; Build only the python bindings, not wxwidgets also.
-             (substitute* "setup.py"
-               (("'build']") "'build_py', '--use_syswx']")))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'configure
+            (lambda* (#:key inputs #:allow-other-keys)
+              ;; Configure the build options provided to the 'build.py' build
+              ;; script.
+              (setenv "WXPYTHON_BUILD_ARGS" "--use_syswx") ;use system 
wxwidgets
+              (setenv "WXWIN" #$(this-package-input "wxwidgets"))
+              ;; Copy the waf executable to the source directory since it needs
+              ;; to be in a writable directory.
+              (copy-file (search-input-file inputs "/bin/waf") "bin/waf")
+              (setenv "WAF" "bin/waf")
+              ;; The build script tries to copy license files from the
+              ;; wxwidgets source tree. Prevent it.
+              (substitute* "wscript"
+                (("updateLicenseFiles\\(cfg\\)" all)
+                 (string-append "#" all)))
+              ;; The build script tries to write to demo/version.py. So, we set
+              ;; correct write permissions.
+              (chmod "demo/version.py" #o644))))))
     (inputs
      (list gtk+ wxwidgets))
     (native-inputs



reply via email to

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