Here is the directory structure:
app/
__init__.py
sub1/
__init__.py
mod1.py
sub2/
__init__.py
sub2.so
test_sub2.py
- The folder app is on my PYTHONPATH
- All of the _init_.py files are empty.
- The shared library sub2.so is a C++ extension module that I compiled using cmake and boost-python.
- test_sub2.py is a test script for the class defined in sub2.so.
- If I run test_sub2.py from the sub2 directory, it imports the module correctly and the test passes.
How do I import the class A from sub2.so into mod1.py?