Mercurial > hg > vampy
comparison vampy-main.cpp @ 54:f0592002c61d
* If PYLIB environment variable is present, use that for the file to preload
author | cannam |
---|---|
date | Fri, 09 Oct 2009 14:07:44 +0000 |
parents | 7e59caea821b |
children | 968258fba5d6 |
comparison
equal
deleted
inserted
replaced
53:7e59caea821b | 54:f0592002c61d |
---|---|
245 } | 245 } |
246 cerr << "Short version: " << shortver << endl; | 246 cerr << "Short version: " << shortver << endl; |
247 // this is useful to find out where the loaded library might be loaded from | 247 // this is useful to find out where the loaded library might be loaded from |
248 cerr << "Python exec prefix: " << Py_GetExecPrefix() << endl; | 248 cerr << "Python exec prefix: " << Py_GetExecPrefix() << endl; |
249 | 249 |
250 char *pylib = getenv("PYLIB"); | |
251 if (pylib && *pylib) { | |
252 cerr << "Trying to preload Python from specified location " << pylib | |
253 << "..." << endl; | |
254 return tryPreload(string(pylib)); | |
255 } | |
256 | |
250 vector<string> pfxs; | 257 vector<string> pfxs; |
251 pfxs.push_back(string(Py_GetExecPrefix()) + "/"); | 258 pfxs.push_back(string(Py_GetExecPrefix()) + "/"); |
252 pfxs.push_back(string(Py_GetExecPrefix()) + "/lib/"); | 259 pfxs.push_back(string(Py_GetExecPrefix()) + "/lib/"); |
253 pfxs.push_back(""); | 260 pfxs.push_back(""); |
254 pfxs.push_back("/usr/lib/"); | 261 pfxs.push_back("/usr/lib/"); |