Cohabitation of debug and release python in the same folder

Olivier Barthelemy barthelemy at geovariances.com
Fri Nov 25 05:52:09 EST 2016


If i try to build a normal python and a 'with-pydebug' python in the same folder, I can run both versions of python by running the real executable names instead of the generic name symlinks.

However, if i want to use sysconfig.get_config_var() to check "Py_DEBUG" (to then know from .py files whether i need to load debug or release versions of other python modules that need c++ compilation), the variables seem to have the value of the last version i installed.
In my case, i compiled and installed in debug, then in release, so the default names symlinks would still point to a release version. And get_config_vars() called from the debug python binary seem to have the values of the release one.

Is there any way to work around that conflict, should i file a bug  for it, or is it "expected" and i should just install my two pythons in different folders?



More information about the Python-list mailing list