mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 13:57:23 +02:00
Fix aliasing of PyQt5 imports
This commit is contained in:
parent
c3f4992229
commit
83aef77ba6
1 changed files with 3 additions and 1 deletions
|
|
@ -198,8 +198,10 @@ def find_spec(self, fullname, path=None, target=None):
|
|||
return find_spec('feedparser')
|
||||
if fullname.startswith('calibre.ebooks.markdown'):
|
||||
return ModuleSpec(fullname, DeVendorLoader(fullname[len('calibre.ebooks.'):]))
|
||||
if fullname.startswith('PyQt5.'):
|
||||
if fullname.startswith('PyQt5'):
|
||||
# this is present for third party plugin compat
|
||||
if fullname == 'PyQt5':
|
||||
return ModuleSpec(fullname, DeVendorLoader('qt'))
|
||||
return ModuleSpec(fullname, DeVendorLoader('qt.webengine' if 'QWebEngine' in fullname else 'qt.core'))
|
||||
if fullname.startswith('Cryptodome'):
|
||||
# this is needed for py7zr which uses pycryptodomex instead of
|
||||
|
|
|
|||
Loading…
Reference in a new issue