Patchwork gnu: python-pyqt: Fix build by explicitly setting the stubsdir.

login
register
mail settings
Submitter Hartmut Goebel
Date Dec. 2, 2016, 5:10 p.m.
Message ID <1480698614-20481-1-git-send-email-h.goebel@crazy-compilers.com>
Download mbox | patch
Permalink /patch/18139/
State New
Headers show

Comments

Hartmut Goebel - Dec. 2, 2016, 5:10 p.m.
Without this option the stub files are tried to be installed into
the python package's site-package directory.

* gnu/packages.qt.scm (python-pyqt, python2-pyqt)[arguments]: In phase
'configure' pass option --stubsdir.
---
 gnu/packages/qt.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Ricardo Wurmus - Dec. 3, 2016, 4:12 p.m.
Hartmut Goebel <h.goebel@crazy-compilers.com> writes:

> Without this option the stub files are tried to be installed into
> the python package's site-package directory.
>
> * gnu/packages.qt.scm (python-pyqt, python2-pyqt)[arguments]: In phase
> 'configure' pass option --stubsdir.
> ---
>  gnu/packages/qt.scm | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
> index b442356..92c6d4b 100644
> --- a/gnu/packages/qt.scm
> +++ b/gnu/packages/qt.scm
> @@ -982,13 +982,15 @@ 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
> +                               "--stubsdir" stubs  ; PEP 484 Type Hints stubs
>                                 "--sipdir" sip))))))))
>      (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
>      (synopsis "Python bindings for Qt")

The patch looks okay to me, but I’d prefer to see your comment about why
this is needed inline above the option.  “PEP 484…” doesn’t tell me
anything, whereas your description in this email was very clear.
Hartmut Goebel - Dec. 5, 2016, 8:53 a.m.
Am 03.12.2016 um 17:12 schrieb Ricardo Wurmus:
> The patch looks okay to me, but I’d prefer to see your comment about why
> this is needed inline above the option.  “PEP 484…” doesn’t tell me
> anything, whereas your description in this email was very clear.

You are right. I'll send an updated patch.
Hartmut Goebel - Dec. 5, 2016, 9:12 a.m.
gnu: python2-pyqt-4: Change package name to python2-pyqt.

       The package *name* contained the version, makeing it impossible to
       install via python2-pyqt@4. Curiously the Pyhton 3 package
       (python-pyqt) already had the correct name.

  gnu: python-pyqt-5.5: Use non-inherited "configure" phase.

       THis is a preperation for the next commit.

  gnu: python-pyqt: Fix build by explicitly setting the stubsdir.

       This is the updated patch.

Patch

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index b442356..92c6d4b 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -982,13 +982,15 @@  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
+                               "--stubsdir" stubs  ; PEP 484 Type Hints stubs
                                "--sipdir" sip))))))))
     (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
     (synopsis "Python bindings for Qt")