diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-09 03:25:35 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-09 03:25:35 +0300 |
commit | 81558783e40394c2c60f61626eb6814f17128503 (patch) | |
tree | 6133b43a16de68f9118a283fb4ecd3cf61d386de /source/blender/blenkernel/intern | |
parent | 4a71765f9a41d6e13b36a53b121338bc373887ac (diff) |
Python: install "bpy" as a package WITH_PYTHON_MODULE
Building WITH_PYTHON_MODULE was creating a "bpy" module that required
Blenders data-files to be located in the module search path too.
This mean that a typical installation on Linux would create:
- `/usr/lib/python3.10/site-packages/bpy.so`
- `/usr/lib/python3.10/site-packages/3.4`
(containing `scripts` & `datafiles`).
The new behavior creates:
- `/usr/lib/python3.10/site-packages/bpy/__init__.so`
- `/usr/lib/python3.10/site-packages/bpy/3.4`
With the advantage that the "bpy" directory is the self contained Python
module.
No changes are needed for the module loading logic as the mechanism to
swap in blend internal Python "bpy" module
(defined in `release/scripts/modules/bpy/__init__.py`)
works the same in both instances.
Thanks to Brecht for macOS support.
Reviewed by brecht
Ref D15911
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/appdir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c index c19afdb4fb8..4bd8cfd5f47 100644 --- a/source/blender/blenkernel/intern/appdir.c +++ b/source/blender/blenkernel/intern/appdir.c @@ -374,7 +374,7 @@ static bool get_path_local_ex(char *targetpath, /* Try `{g_app.program_dirname}/2.xx/{folder_name}` the default directory * for a portable distribution. See `WITH_INSTALL_PORTABLE` build-option. */ const char *path_base = g_app.program_dirname; -#ifdef __APPLE__ +#if defined(__APPLE__) && !defined(WITH_PYTHON_MODULE) /* Due new code-sign situation in OSX > 10.9.5 * we must move the blender_version dir with contents to Resources. */ char osx_resourses[FILE_MAX]; |