diff --git a/setup.py b/setup.py index 1a0d912..1906a07 100644 --- a/setup.py +++ b/setup.py @@ -10,6 +10,14 @@ cfg = sipconfig.Configuration() pyqt_sip_dir = cfg.default_sip_dir +for p in (os.path.join(pyqt_sip_dir, "PyQt5"), + os.path.join(pyqt_sip_dir, "PyQt5-3"), + os.path.join(pyqt_sip_dir, "PyQt4"), + pyqt_sip_dir, + os.path.join(cfg.default_mod_dir, "PyQt5", "bindings")): + if os.path.exists(os.path.join(p, "QtCore", "QtCoremod.sip")): + pyqt_sip_dir = p + break try: import PyQt5