Automatic setup of meta path hooks?

J

jwp

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top