Right.
So I have found a work around. I have no idea how robust this procedure is (given the simplicity, I am guessing it may have a harder time with more difficult modules, but I'll continue testing), but if this is what you want, go ahead and give this a try. I'm being overly pedagogical here, because this is kind of frustrating:
1.) Create the .so shared library in CodeBlocks (
click here to learn about the Boost.Python API). This just involves installing the Boost.Python library, linking against it (and the Python API) in your compiler, and including the folder which contain your Python API. I can't speak to compilations that aren't based on g++ compilers and for GNU/Linux OS's, but the toolchain should look something like
g++-5 -Wall -fexceptions -std=c++14 -fPIC -g -pedantic -I/usr/include/python3.5m -c example_source.cpp -o obj/Debug/example_source.o
g++-5 -shared obj/Debug/example_source.o -o bin/Debug/[NAME OF MODULE].so -lboost_python-py35 -lpython3.5m
(Important stuff in bold: I'm using Python 3.5, thus I am including the python3.5m library (python3.5 is also okay, 3.5m just handles memory size better) alongside the boost_python-py35 library (look for the SO file name in "/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu" or wherever your Python library is installed, lose the "lib" add "-l" and drop the ".so", and that's how you link), and remember that you often need -fPIC on CodeBlocks to make shared libraries.)
2.) In that folder, keeping the same convention as Boost.Python's module naming in your C++ source files, create a [module name].py file, and copy/paste:
def __bootstrap__():
global __bootstrap__, __loader__, __file__
import sys, pkg_resources, imp
__file__ = pkg_resources.resource_filename(__name__,'[INSERT MY SO FILE NAME HERE].so')
__loader__ = None; del __bootstrap__, __loader__
imp.load_dynamic(__name__,__file__)
__bootstrap__()
(Don't ask me, I'm not an expert in pkg-resources or imp, but it seems that pkg-resources and imp can load the SO shared library's made for Python.)
3.) Now, in your Python file that uses this module, you may include the extension module via
import sys
sys.path.append('.') # Or, if the [YourModule].py/.so files are located in a different folder, set the destination here
import [INSERT YOUR MODULE NAME]
and then you can freely use your home brew C++ extension Python module, remembering obviously to use the correct Python interpreter (in this example, Python 3.5) and the correct names for the wrappers for your functions/classes. Now all you have to do is learn how to use the Boost.Python library.
PS: It would be really helpful if someone wrote a CodeBlocks script/wizard modification for classes/functions that automatically wrote a header/source/source IDL file (i.e. the special Boost.Python IDL code). I think CodeBlocks has a scripting language called "Squirrel", I may look into doing this if this pkg_resources works consistently when I include classes and make a more sophisticated C++ extension-module for Python.