This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] ignore PYTHONHOME environment variable.
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 23 Nov 2010 04:00:37 +0100
- Subject: Re: [RFA] ignore PYTHONHOME environment variable.
- References: <email@example.com>
On Tue, 23 Nov 2010 02:03:22 +0100, Joel Brobecker wrote:
> This is something I hinted during one of our discussion at this year's
> GCC Summit.
> If PYTHONHOME is defined in the environment, then Py_SetProgramName
> does not use the program-name location to find the python library.
> Instead, it follows the PYTHONHOME, which can cause problems if
> it points to a different Python installation, particularly if that
> installation is from a different version of Python.
On standard Fedora 14 ./configure (no python options given) I get:
#define HAVE_LIBPYTHON2_7 1
#define HAVE_PYTHON 1
#define PYTHON_PATH_RELOCATABLE 0
#define WITH_PYTHON_PATH "/usr"
I am not a Python expect but I believe for GDB linked with the only regular
system Python $PYTHONHOME should work, even for GDB-Python.
Maybe it should be overriden only for the case of PYTHON_PATH_RELOCATABLE?
Or maybe only if --with-python=SPECIFIC-PATH has been given?
(I do not have an opinion what it should do in such case, just I think I know
what it should do in the default system Python case.)