This is a demo of how a python package can be transparently split between two locations. This setup is particularly useful when your package contains binary extension modules that are built out of the source tree, i.e. with cmake, but your package also contains pure python source files. With the setup described below all modules will appear as a single unified package, while retaining their separate file locations. All that is required is that root/build/
is on the python path and that root/build/mypkg/__init__.py
has information about the absolute location of root/src
. With this strategy any errorprone file copying is avoided.
root/
build/
test.py