I have a package I've created in C++ and, have already compiled it into a shared library.
When I link against it with my own main function, I can initialize the package by calling the initialization function directly, initfoo, and everything works fine.
How do I get python to recognize my shared library as a package, so I can just type:
import foo
running from the regular python interpreter?
I'm not interested in using distutils to compile the file, since the compilation has to be part of the regular cmake build system. I just need to create whatever package files necessary to load my shared library.
Update: I now have it working. The issue was with cmake defaulting to a lib prefix for shared library names. To fix this requires
SET_TARGET_PROPERTIES(foo PROPERTIES PREFIX "")
and for Mac OS X
SET_TARGET_PROPERTIES(foo PROPERTIES SUFFIX ".so")