librelist archives

« back to archive

Customizing python locations, etc.

Customizing python locations, etc.

From:
Philip Zeyliger
Date:
2012-03-17 @ 23:52
Hi there,

Thanks for multicorn!  I've been looking for something just like it.

So far, I've installed multicorn the easy way, by doing a git clone, and a
make install.  I've gotten so far as to write a quick FDW for the psutil
module.  I've got some questions on how best to set up development:

Restarts. I *think* there's one python instance, started by Py_Initialize()
in _PG_init().  Is the only way to reload my FDW to restart the database
server?  That certainly seems to have worked, but would be nice to trigger
something lighter-weight in development mode.

Logging. Haven't tried much here: any advice on logging and/or breakpoints
from within a FDW?

Customizing the python environment. I tend to use virtualenvs for my python
environments.  Looks like multicorn.so is linked against /usr/lib/
libpython2.7.so (in my case), so the module path is basically the system
module path.  Has anyone done the relevant Makefile changes to load a
custom virtualenv?

Thanks,

-- Philip