The initX function relates to the module name you build it under.
> So, all of that was leadup to this question: is there anyway for me to just
> specify that I want the output filename to be different? (Basically, change
> the -o option on the last gcc call that gets made for me)? If anybody knows
> how to do this, it would be really cool.
When python looks up module X, it looks for a file X.so which must
contain a function initX. Changing the name of the .so file without
changing the name of the module would break Python's ability to import
it.
For your usecase I would recommend a level of indirection at the
Python level, either by adding import hooks, injecting foo_tmp into
sys.modules under the name foo, or a conditional "import foo_tmp as
foo."
- Robert
My hunch is that using cp will be easier than fighting with distutils
for this usecase :)