I have a pure C module for Python and I'd like to be able to invoke it using the python -m modulename approach.  This works fine with modules implemented in Python and one obvious workaround is to add an extra file for that purpose.  However I really want to keep things to my one single distributed binary and not add a second file just for this workaround.
I don't care how hacky the solution is.
If you do try to use a C module with -m then you get an error message No code object available for <modulename>.
Does your requirement of single distributed binary allow for the use of an egg?  If so, you could package your module with a __main__.py with your calling code and the usual __init__.py...
If you're really adamant, maybe you could extend pkgutil.ImpLoader.get_code to return something for C modules (e.g., maybe a special __code__ function).  To do that, I think you're going to have to actually change it in the Python source.  Even then, pkgutil uses exec to execute the code block, so it would have to be Python code anyway.
TL;DR: I think you're euchred.  While Python modules have code at the global level that runs at import time, C modules don't; they're mostly just a dict namespace.  Thus, running a C module doesn't really make sense from a conceptual standpoint.  You need some real Python code to direct the action.
Getting python -m module to work for a module implemented in C