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.