summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2018-07-10 16:07:58 +0200
committerFlorian Bruhin <git@the-compiler.org>2018-07-10 16:09:44 +0200
commit21adb2cc5433753a68cd3b1e02eecda65ab7d617 (patch)
tree2af7106e5bb41bc24930484f669c2270e7f1dc7e
parent6b406899f1b46a93ac8a8ead2b996aaa864db8f8 (diff)
downloadqutebrowser-21adb2cc5433753a68cd3b1e02eecda65ab7d617.tar.gz
qutebrowser-21adb2cc5433753a68cd3b1e02eecda65ab7d617.zip
Make link_pyqt work with PyQt 5.11
(cherry picked from commit 14205ae14f29fd9c1eadeeaf2d2f5bbf9718c573)
-rw-r--r--scripts/link_pyqt.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/link_pyqt.py b/scripts/link_pyqt.py
index e29a69c3a..ae7eaa622 100644
--- a/scripts/link_pyqt.py
+++ b/scripts/link_pyqt.py
@@ -136,7 +136,15 @@ def link_pyqt(executable, venv_path):
executable: The python executable where the source files are present.
venv_path: The path to the virtualenv site-packages.
"""
- sip_file = get_lib_path(executable, 'sip')
+ try:
+ get_lib_path(executable, 'PyQt5.sip')
+ except Error:
+ # There is no PyQt5.sip, so we need to copy the toplevel sip.
+ sip_file = get_lib_path(executable, 'sip')
+ else:
+ # There is a PyQt5.sip, it'll get copied with the PyQt5 dir.
+ sip_file = None
+
sipconfig_file = get_lib_path(executable, 'sipconfig', required=False)
pyqt_dir = os.path.dirname(get_lib_path(executable, 'PyQt5.QtCore'))