mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
6608e3e365
commit
cc9a40868e
@ -146,7 +146,7 @@ def copy_python(env, ext_dir):
|
|||||||
shutil.copytree(c, j(dest, x), ignore=partial(ignore_in_lib, ignored_dirs={}))
|
shutil.copytree(c, j(dest, x), ignore=partial(ignore_in_lib, ignored_dirs={}))
|
||||||
elif os.path.isfile(c):
|
elif os.path.isfile(c):
|
||||||
shutil.copy2(c, j(dest, x))
|
shutil.copy2(c, j(dest, x))
|
||||||
pdir = j(dest, 'calibre', 'plugins')
|
pdir = j(env.lib_dir, 'calibre-extensions')
|
||||||
if not os.path.exists(pdir):
|
if not os.path.exists(pdir):
|
||||||
os.mkdir(pdir)
|
os.mkdir(pdir)
|
||||||
for x in glob.glob(j(ext_dir, '*.so')):
|
for x in glob.glob(j(ext_dir, '*.so')):
|
||||||
|
@ -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.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.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
|
void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user