link_pyqt: Use PyQt5.QtCore to find PyQt5 path

For some reason on OS X, PyQt5.__file__ does not exist as it's a
namespace package.
This commit is contained in:
Florian Bruhin 2016-07-26 13:59:25 +02:00
parent b12c984846
commit 614794a62a

View File

@ -136,7 +136,7 @@ def link_pyqt(executable, venv_path):
"""
sip_file = get_lib_path(executable, 'sip')
sipconfig_file = get_lib_path(executable, 'sipconfig', required=False)
pyqt_dir = os.path.dirname(get_lib_path(executable, 'PyQt5'))
pyqt_dir = os.path.dirname(get_lib_path(executable, 'PyQt5.QtCore'))
for path in [sip_file, sipconfig_file, pyqt_dir]:
if path is None: