# HG changeset patch # User cannam # Date 1255097264 0 # Node ID f0592002c61d8288a57482c4c8aec0993adef9c4 # Parent 7e59caea821b77f62b528cb793f1213e0a0835ae * If PYLIB environment variable is present, use that for the file to preload diff -r 7e59caea821b -r f0592002c61d vampy-main.cpp --- a/vampy-main.cpp Fri Oct 09 13:48:25 2009 +0000 +++ b/vampy-main.cpp Fri Oct 09 14:07:44 2009 +0000 @@ -247,6 +247,13 @@ // this is useful to find out where the loaded library might be loaded from cerr << "Python exec prefix: " << Py_GetExecPrefix() << endl; + char *pylib = getenv("PYLIB"); + if (pylib && *pylib) { + cerr << "Trying to preload Python from specified location " << pylib + << "..." << endl; + return tryPreload(string(pylib)); + } + vector pfxs; pfxs.push_back(string(Py_GetExecPrefix()) + "/"); pfxs.push_back(string(Py_GetExecPrefix()) + "/lib/");