guix-commits
[Top][All Lists]
Advanced

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

67/163: gnu: freecad: Wrap with the new Guix PYTHONPATH.


From: guix-commits
Subject: 67/163: gnu: freecad: 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 e67d0c9cdce8f596a1ffd59dfc90d975dabb2404
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 00:55:14 2021 -0500

    gnu: freecad: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/engineering.scm (freecad)[phases]{wrap-pythonpath}: Wrap with
    the new Guix PYTHONPATH.  Delete trailing #t.
    {restore-pythonpath}: Delete phase.
    [inputs]: Rename python-wrapper label from python-wrapper to python.
---
 gnu/packages/engineering.scm | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 4c86047..e9f017f 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2551,7 +2551,7 @@ full programmatic control over your models.")
          ("python-pyside-2" ,python-pyside-2)
          ("python-shiboken-2" ,python-shiboken-2)
          ("python-pivy" ,python-pivy)
-         ("python-wrapper" ,python-wrapper)
+         ("python" ,python-wrapper)
          ("qtbase" ,qtbase)
          ("qtsvg" ,qtsvg)
          ("qtx11extras" ,qtx11extras)
@@ -2562,7 +2562,12 @@ full programmatic control over your models.")
          ("xerces-c" ,xerces-c)
          ("zlib" ,zlib)))
       (arguments
-       `(#:tests? #f
+       `(#:imported-modules ,(cons '(guix build python-build-system)
+                                   %qt-build-system-modules)
+         #:modules ((guix build qt-build-system)
+                    ((guix build python-build-system) #:select 
(guix-pythonpath))
+                    (guix build utils))
+         #:tests? #f
          #:configure-flags
          (list
           "-DBUILD_QT5=ON"
@@ -2587,18 +2592,13 @@ full programmatic control over your models.")
                          "/include/shiboken2"))
          #:phases
          (modify-phases %standard-phases
-           (add-before 'configure 'restore-pythonpath
-             (lambda _
-               (substitute* "src/Main/MainGui.cpp"
-                 (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
-               #t))
            (add-after 'install 'wrap-pythonpath
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out")))
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (pythonpath (guix-pythonpath inputs)))
                  (wrap-program (string-append out "/bin/FreeCAD")
-                   (list "PYTHONPATH"
-                         'prefix (list (getenv "PYTHONPATH")))))
-               #t)))))
+                   (list pythonpath
+                         'prefix (list (getenv pythonpath))))))))))
       (home-page "https://www.freecadweb.org/";)
       (synopsis "Your Own 3D Parametric Modeler")
       (description



reply via email to

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