2021-12-29 03:36:59 -07:00
|
|
|
|
|
|
|
#@@CALIBRE_COMPAT_CODE_START@@
|
|
|
|
import sys, os
|
|
|
|
|
2022-01-01 06:09:56 -07:00
|
|
|
# Explicitly allow importing everything ...
|
2021-12-29 03:36:59 -07:00
|
|
|
if os.path.dirname(os.path.dirname(os.path.abspath(__file__))) not in sys.path:
|
|
|
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
2022-01-01 06:09:56 -07:00
|
|
|
if os.path.dirname(os.path.abspath(__file__)) not in sys.path:
|
|
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
2021-12-29 03:36:59 -07:00
|
|
|
|
|
|
|
# Bugfix for Calibre < 5:
|
|
|
|
if "calibre" in sys.modules and sys.version_info[0] == 2:
|
|
|
|
from calibre.utils.config import config_dir
|
|
|
|
if os.path.join(config_dir, "plugins", "DeDRM.zip") not in sys.path:
|
|
|
|
sys.path.insert(0, os.path.join(config_dir, "plugins", "DeDRM.zip"))
|
2022-01-01 06:09:56 -07:00
|
|
|
|
|
|
|
# Explicitly set the package identifier so we are allowed to import stuff ...
|
2023-08-03 12:45:06 -06:00
|
|
|
__package__ = "calibre_plugins.dedrm"
|
2022-01-01 06:09:56 -07:00
|
|
|
|
2021-12-29 03:36:59 -07:00
|
|
|
#@@CALIBRE_COMPAT_CODE_END@@
|