guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/04: gnu: python-pyqt: Don't use private sip file.


From: Efraim Flashner
Subject: 04/04: gnu: python-pyqt: Don't use private sip file.
Date: Sun, 22 Jul 2018 13:43:20 -0400 (EDT)

efraim pushed a commit to branch qt-updates
in repository guix.

commit 2338755afae1b54504f4cc410a41c1ccc8493fdf
Author: Efraim Flashner <address@hidden>
Date:   Sun Jul 22 14:40:29 2018 +0300

    gnu: python-pyqt: Don't use private sip file.
    
    * gnu/packages/qt.scm (python-sip)[arguments]: Don't use '--sip-module'
    flag in custom 'configure phase.
    (python-pyqt)[sources]: Add patch.
    * gnu/packages/patches/pyqt-public-sip.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Register it.
---
 gnu/local.mk                               |  1 +
 gnu/packages/patches/pyqt-public-sip.patch | 55 ++++++++++++++++++++++++++++++
 gnu/packages/qt.scm                        |  4 +--
 3 files changed, 58 insertions(+), 2 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 9e87526..5ae074d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1050,6 +1050,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/pybugz-stty.patch                       \
   %D%/packages/patches/pygpgme-disable-problematic-tests.patch  \
   %D%/packages/patches/pyqt-configure.patch                    \
+  %D%/packages/patches/pyqt-public-sip.patch                   \
   %D%/packages/patches/python-2-deterministic-build-info.patch \
   %D%/packages/patches/python-2.7-adjust-tests.patch           \
   %D%/packages/patches/python-2.7-search-paths.patch           \
diff --git a/gnu/packages/patches/pyqt-public-sip.patch 
b/gnu/packages/patches/pyqt-public-sip.patch
new file mode 100644
index 0000000..5ec45f0
--- /dev/null
+++ b/gnu/packages/patches/pyqt-public-sip.patch
@@ -0,0 +1,55 @@
+https://sources.debian.org/data/main/p/pyqt5/5.11.2+dfsg-1/debian/patches/public_sip.diff
+
+From: Dmitry Shachnev <address@hidden>
+Date: Tue, 3 Jul 2018 09:46:42 +0300
+Subject: Use the public version of sip module
+
+Per https://www.debian.org/doc/debian-policy/#convenience-copies-of-code.
+---
+ configure.py | 19 +------------------
+ 1 file changed, 1 insertion(+), 18 deletions(-)
+
+diff --git a/configure.py b/configure.py
+index 7c48136..ca23f93 100644
+--- a/configure.py
++++ b/configure.py
+@@ -642,15 +642,6 @@ class TargetConfiguration:
+                     "Unable to import enum.  Please install the enum34 "
+                     "package from PyPI.")
+ 
+-        # Check there is a private copy of the sip module already installed.
+-        try:
+-            from PyQt5 import sip
+-        except ImportError:
+-            error(
+-                    "Unable to import PyQt5.sip.  Make sure you have "
+-                    "configured SIP to create a private copy of the sip "
+-                    "module.")
+-
+         # Get the details of the Python interpreter library.
+         py_major = self.py_version >> 16
+         py_minor = (self.py_version >> 8) & 0x0ff
+@@ -2438,7 +2429,7 @@ def get_sip_flags(target_config):
+     the target configuration.
+     """
+ 
+-    sip_flags = ['-n', 'PyQt5.sip']
++    sip_flags = ['-n', 'sip']
+ 
+     # If we don't check for signed interpreters, we exclude the 'VendorID'
+     # feature
+@@ -2914,14 +2905,6 @@ def check_sip(target_config):
+     target_config is the target configuration.
+     """
+ 
+-    # Check there is a private copy of the sip module already installed.
+-    try:
+-        from PyQt5 import sip
+-    except ImportError:
+-        error(
+-                "Unable to import PyQt5.sip.  Make sure you have configured "
+-                "SIP to create a private copy of the sip module.")
+-
+     if target_config.sip is None:
+         error(
+                 "Make sure you have a working sip on your PATH or use the "
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 9e02cdc..20543fe 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1632,7 +1632,6 @@ message.")))
                                         python-major+minor
                                         "/site-packages")))
                (invoke "python" "configure.py"
-                       "--sip-module" "PyQt5.sip" ; for python-pyqt
                        "--bindir" bin
                        "--destdir" lib
                        "--incdir" include)))))))
@@ -1671,7 +1670,8 @@ module provides support functions to the automatically 
generated code.")
         (sha256
          (base32
           "00wn9svgyp0fsrkc4ma15zcxg31pw4gsgaz6nwb3fhy3al8miakw"))
-       (patches (search-patches "pyqt-configure.patch"))))
+       (patches (search-patches "pyqt-configure.patch"
+                                "pyqt-public-sip.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("qtbase" ,qtbase))) ; for qmake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]