diff options
Diffstat (limited to 'gnu/packages/qt.scm')
-rw-r--r-- | gnu/packages/qt.scm | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index ae951aad5f..4a8fb6c66d 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -1015,13 +1015,19 @@ module provides support functions to the automatically generated code.") ".")) (lib (string-append out "/lib/python" python-major+minor - "/site-packages"))) + "/site-packages")) + (stubs (string-append lib "/PyQt5"))) (zero? (system* "python" "configure.py" "--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)))))))) (home-page "https://www.riverbankcomputing.com/software/pyqt/intro") (synopsis "Python bindings for Qt") @@ -1054,6 +1060,36 @@ contain over 620 classes.") (base32 "056qmkv02wdcfblqdaxiswrgn4wa88sz22i1x58dpb1iniavplfd")) (patches (search-patches "pyqt-configure.patch")))) + (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")) + (bin (string-append out "/bin")) + (sip (string-append out "/share/sip")) + (plugins (string-append out "/plugins")) + (designer (string-append plugins "/designer")) + (qml (string-append plugins "/PyQt5")) + (python (assoc-ref inputs "python")) + (python-version + (last (string-split python #\-))) + (python-major+minor + (string-join + (take (string-split python-version #\.) 2) + ".")) + (lib (string-append out "/lib/python" + python-major+minor + "/site-packages"))) + (zero? (system* "python" "configure.py" + "--confirm-license" + "--bindir" bin + "--destdir" lib + "--designer-plugindir" designer + "--qml-plugindir" qml + "--sipdir" sip)))))))) (native-inputs `(("python-sip" ,python-sip) ("qt" ,qt))))) @@ -1115,7 +1151,7 @@ contain over 620 classes.") (define-public python2-pyqt-4 (package (inherit python-pyqt-4) - (name "python2-pyqt-4") + (name "python2-pyqt") (native-inputs `(("python-sip" ,python2-sip) ("qt" ,qt-4))) |