From 26b04da35bbdc0bba09f4b4624371e20eb479266 Mon Sep 17 00:00:00 2001 From: Brendan Tildesley Date: Mon, 22 Feb 2021 22:20:40 +1100 Subject: [PATCH 3/4] pyqt --- gnu/packages/qt.scm | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index b9f34f39be..33b60a74d1 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -2019,7 +2019,8 @@ module provides support functions to the automatically generated code.") "pyqt-public-sip.patch")))) (build-system gnu-build-system) (native-inputs - `(("qtbase" ,qtbase))) ; for qmake + `(("qtbase" ,qtbase) + ("python-pyqt-builder" ,python-pyqt-builder))) (propagated-inputs `(("python-sip" ,python-sip))) (inputs @@ -2044,6 +2045,7 @@ module provides support functions to the automatically generated code.") ,@%gnu-build-system-modules) #:imported-modules ((guix build python-build-system) ,@%gnu-build-system-modules) + #:make-flags (list (string-append "INSTALL_ROOT=" %output)) #:phases (modify-phases %standard-phases ;; When building python-pyqtwebengine, can not be @@ -2059,29 +2061,16 @@ module provides support functions to the automatically generated code.") #t))) (replace 'configure (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (sip (string-append out "/share/sip")) - (plugins (string-append out "/lib/qt5/plugins")) - (designer (string-append plugins "/designer")) - (qml (string-append plugins "/PyQt5")) - (python (assoc-ref inputs "python")) - (lib (string-append out "/lib/python" + (let* ((python (assoc-ref inputs "python")) + (lib (string-append "/lib/python" (python-version python) - "/site-packages")) - (stubs (string-append lib "/PyQt5"))) - (invoke "python" "configure.py" + "/site-packages"))) + (invoke "sip-build" "--confirm-license" - "--bindir" bin - "--destdir" lib - "--designer-plugindir" designer - "--qml-plugindir" qml - ; Where to install the PEP 484 Type Hints stub - ; files. Without this the stubs are tried to be - ; installed into the python package's - ; site-package directory, which is read-only. - "--stubsdir" stubs - "--sipdir" sip))))))) + "--no-make" + "--target-dir" lib)))) + (add-before 'build 'chdir + (lambda _ (chdir "build")))))) (home-page "https://www.riverbankcomputing.com/software/pyqt/intro") (synopsis "Python bindings for Qt") (description -- 2.30.1