Re: [orca-list] Problem with PYTHONPATH and multiple versions of orca



I'm not quite sure I understand how this stuff is actually getting in the way. My understanding is that PYTHONPATH should be considered first. Is it possible that PYTHONPATH has been defined in your local environment? The orca script adds itself to the end of the PYTHONPATH environment variable, so if you have PYTHONPATH set up already, it might end up picking up that. As for why orca adds itself to the end rather than the beginning, see http://bugzilla.gnome.org/show_bug.cgi?id=491417.

Will

On Sep 23, 2008, at 7:32 AM, Michael Whapples wrote:

Hello,
I recently noticed that my trunk build of orca was not being used. The
trunk build was in a custom location, and I had orca 2.22.3 from my
distro installed in the standard place.

After some looking, I realised the following: although the correct orca
bash script was being run, it was importing from the standard python
site-packages directory so using the distro's orca python files. Further examination of the system revealed that easy_install from setuptools had
added the python site-packages directory to its pth file, so this meant
that the standard site-packages directory was searched for modules
before the custom orca directory which is specified in the PYTHONPATH
environment variable set by the orca script.

I have solved this manually by removing the standard site-packages
directory from the easy-install.pth file, but the question is what can
be done so that orca shouldn't suffer from this again?

Should setuptools (or any other package) add the standard site-packages
directory to their .pth files (I feel the correct answer but relies on
others being correct). Alternatively is there any way orca could ensure
that its custom directory is the first on the packages path as this
shows that PYTHONPATH can fail to do this.

Michael Whapples

_______________________________________________
Orca-list mailing list
Orca-list gnome org
http://mail.gnome.org/mailman/listinfo/orca-list
Visit http://live.gnome.org/Orca for more information on Orca




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]