Linux: Move the calibre extensions out of site-packages

This means path based imports of them will continue to work
even after freeze into single dir
This commit is contained in:
Kovid Goyal 2020-09-28 13:50:54 +05:30
parent 6608e3e365
commit cc9a40868e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ def copy_python(env, ext_dir):
shutil.copytree(c, j(dest, x), ignore=partial(ignore_in_lib, ignored_dirs={}))
elif os.path.isfile(c):
shutil.copy2(c, j(dest, x))
pdir = j(dest, 'calibre', 'plugins')
pdir = j(env.lib_dir, 'calibre-extensions')
if not os.path.exists(pdir):
os.mkdir(pdir)
for x in glob.glob(j(ext_dir, '*.so')):

View File

@ -38,7 +38,7 @@ get_paths() {
swprintf(interpreter_data.python_lib_path, arraysz(interpreter_data.python_lib_path), L"%ls/lib/python%d.%d", interpreter_data.python_home_path, PY_VERSION_MAJOR, PY_VERSION_MINOR);
swprintf(interpreter_data.resources_path, arraysz(interpreter_data.resources_path), L"%ls/resources", interpreter_data.python_home_path);
swprintf(interpreter_data.extensions_path, arraysz(interpreter_data.extensions_path), L"%ls/site-packages/calibre/plugins", interpreter_data.python_lib_path);
swprintf(interpreter_data.extensions_path, arraysz(interpreter_data.extensions_path), L"%ls/lib/calibre-extensions", interpreter_data.python_home_path);
}
void