diff mbox

[3/3,v2] gnu: python-pyqt: Fix build by explicitly setting the stubsdir.

Message ID 1480929178-6383-4-git-send-email-h.goebel@crazy-compilers.com
State New
Headers show

Commit Message

Hartmut Goebel Dec. 5, 2016, 9:12 a.m. UTC
* gnu/packages.qt.scm (python-pyqt, python2-pyqt)[arguments]: In phase
'configure' pass option --stubsdir.
---
 gnu/packages/qt.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Efraim Flashner Dec. 8, 2016, 9:20 p.m. UTC | #1
On Mon, Dec 05, 2016 at 10:12:58AM +0100, Hartmut Goebel wrote:
> * gnu/packages.qt.scm (python-pyqt, python2-pyqt)[arguments]: In phase
> 'configure' pass option --stubsdir.
> ---
>  gnu/packages/qt.scm | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
> index aaa7e1c..4a8fb6c 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")
> -- 
> 2.7.4
> 

python-pyqt-5.6 built successfully for me with these changes
diff mbox

Patch

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index aaa7e1c..4a8fb6c 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")