From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine. Date: Mon, 13 Jan 2020 15:16:14 +0100 Message-ID: <87o8v7qw5t.fsf@ambrevar.xyz> References: <20191109100530.zdfrewfmengq7pud@hooch.localdomain> <20200113103304.9093-1-mike.rosset@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:33701) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ir0Wd-0003vs-Dn for bug-guix@gnu.org; Mon, 13 Jan 2020 09:17:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ir0Wb-0004XZ-Vx for bug-guix@gnu.org; Mon, 13 Jan 2020 09:17:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:52804) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ir0Wb-0004X9-S5 for bug-guix@gnu.org; Mon, 13 Jan 2020 09:17:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ir0Wb-0005Wa-MN for bug-guix@gnu.org; Mon, 13 Jan 2020 09:17:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20200113103304.9093-1-mike.rosset@gmail.com> (Mike Rosset's message of "Mon, 13 Jan 2020 02:33:03 -0800") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: Mike Rosset Cc: 38148@debbugs.gnu.org Thanks for the patches, comments below: Mike Rosset writes: > * gnu/packages/qt.scm (python-pyqtwebengine): New variable. > --- > gnu/packages/qt.scm | 97 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 97 insertions(+) > > diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm > index 514577678e..fcb297e99c 100644 > --- a/gnu/packages/qt.scm > +++ b/gnu/packages/qt.scm > @@ -38,6 +38,7 @@ > #:use-module (guix build-system cmake) > #:use-module (guix build-system gnu) > #:use-module (guix build-system trivial) > + #:use-module (guix build-system python) > #:use-module (guix packages) > #:use-module (guix deprecation) > #:use-module (guix utils) > @@ -1947,6 +1948,17 @@ module provides support functions to the automatically generated code.") > ,@%gnu-build-system-modules) > #:phases > (modify-phases %standard-phases > + ;; When building python-pyqtwebengine can not be Comma after python-pyqtwebengine helps with readability. > + ;; included. Here we substitute the full path to the header in the Double-space after period. > + ;; store. > + (add-before 'configure 'substitute-source > + (lambda* (#:key inputs #:allow-other-keys) > + (let* ((qtbase (assoc-ref inputs "qtbase")) > + (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\""))) > + (substitute* "sip/QtPrintSupport/qprinter.sip" > + (("") > + qtprinter.h)) > + #t))) > (replace 'configure > (lambda* (#:key inputs outputs #:allow-other-keys) > (let* ((out (assoc-ref outputs "out")) > @@ -1986,6 +1998,91 @@ framework. The bindings are implemented as a set of Python modules and > contain over 620 classes.") > (license license:gpl3))) Please apply the above pyqt change to a separate commit. > +(define-public python-pyqtwebengine > + (package > + (name "python-pyqtwebengine") > + (version "5.12.1") > + (source > + (origin > + (method url-fetch) > + (uri (string-append > + "https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/" > + version "/PyQtWebEngine_gpl-" version ".tar.gz")) > + (sha256 > + (base32 > + "0wylkd7fh2g27y3710rpxmj9wx0wpi3z7qbv6khiddm15rkh81w6")))) > + (build-system gnu-build-system) > + (native-inputs > + `(("python" ,python) > + ("python-sip" ,python-sip) > + ;; qtbase is required for qmake > + ("qtbase" ,qtbase))) > + (inputs > + `(("python" ,python-wrapper) > + ("python-sip" ,python-sip) > + ("python-pyqt" ,python-pyqt) > + ("qtbase" ,qtbase) > + ("qtsvg" ,qtsvg) > + ("qtdeclarative" ,qtdeclarative) > + ("qtwebchannel" ,qtwebchannel) > + ("qtwebengine" ,qtwebengine) > + ("python-pyqt" ,python-pyqt) > + ("qtwebengine" ,qtwebengine))) qbwebengine duplicate. > + (arguments > + `(#:modules ((srfi srfi-1) > + ,@%gnu-build-system-modules) > + #:phases > + (modify-phases %standard-phases > + (replace 'configure > + (lambda* (#:key inputs outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (sipdir (string-append out "/share/sip")) > + (pyqt-sipdir (string-append > + (assoc-ref inputs "python-pyqt") "/share/sip")) > + (python (assoc-ref inputs "python")) > + (python-version > + (last (string-split python #\-))) > + (python-major+minor > + (string-join > + (take (string-split python-version #\.) 2) > + ".")) Use version-major+minor from (guix utils) instead? > + (lib (string-append out "/lib/python" > + python-major+minor > + "/site-packages/PyQt5")) > + (stubs (string-append lib "/PyQt5"))) > + > + (system* "mkdir" "-p" sipdir) (mkdir-p sipdir) > + (invoke "python" "configure.py" > + "-w" > + "--no-dist-info" > + "--destdir" lib > + "--no-qsci-api" > + "--stubsdir" stubs > + "--sipdir" sipdir > + "--pyqt-sipdir" pyqt-sipdir)))) > + ;; Because this has a different prefix then python-pyqt then we need "then python-pyqt" -> "than python-pyqt". > + ;; to make this a namespace of it's own Missing period. -- Pierre Neidhardt https://ambrevar.xyz/