From 21adb2cc5433753a68cd3b1e02eecda65ab7d617 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 10 Jul 2018 16:07:58 +0200 Subject: Make link_pyqt work with PyQt 5.11 (cherry picked from commit 14205ae14f29fd9c1eadeeaf2d2f5bbf9718c573) --- scripts/link_pyqt.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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')) -- cgit v1.2.3-54-g00ecf