diff --git a/ebook_converter/__init__.py b/ebook_converter/__init__.py index 1f08880..ae80283 100644 --- a/ebook_converter/__init__.py +++ b/ebook_converter/__init__.py @@ -14,12 +14,11 @@ from ebook_converter.constants_old import islinux, isfrozen, \ isbsd, __appname__, __version__, __author__, \ config_dir from ebook_converter.ebooks.html_entities import html5_entities -from ebook_converter.startup import winutil, winutilerror if False: # Prevent pyflakes from complaining - winutil, winutilerror, __appname__, islinux, __version__ + __appname__, islinux, __version__ isfrozen, __author__ isbsd, config_dir diff --git a/ebook_converter/startup.py b/ebook_converter/startup.py index 157a9ee..b1227ca 100644 --- a/ebook_converter/startup.py +++ b/ebook_converter/startup.py @@ -13,25 +13,9 @@ builtins.__dict__['dynamic_property'] = lambda func: func(None) _run_once = False -winutil = winutilerror = None if not _run_once: _run_once = True - from importlib import import_module - - class DeVendor(object): - - def find_spec(self, fullname, path, target=None): - spec = None - if fullname == 'calibre.web.feeds.feedparser': - m = import_module('feedparser') - spec = m.__spec__ - elif fullname.startswith('calibre.ebooks.markdown'): - m = import_module(fullname[len('calibre.ebooks.'):]) - spec = m.__spec__ - return spec - - sys.meta_path.insert(0, DeVendor()) # Ensure that all temp files/dirs are created under a calibre tmp dir from ebook_converter.ptempfile import base_dir