Automatic setup of meta path hooks?

jwp james.pye at gmail.com
Thu Jul 12 03:37:43 CEST 2012


Hi,

I'm working on a meta path hook that performs compilation of C extension modules on import ( github.com/jwp/py-c ; pip install c ). It mostly works, but I'm having a hard time finding a standard way to automatically install the hook upon interpreter startup.

I've thought about just having depending projects install the loader themselves, but I was hoping to make it seamless...Not to mention, there's the possibility of the case where the extension module is compiled and installed with setup.py. In which case, the loader isn't necessary, so it seems inappropriate to reference and install the meta path hook in an outer package module.

Am I missing something? Is there some setuptools/distribute magicalawesome that I can use?



More information about the Python-list mailing list