emerge apparently uses PYTHONPATH to point to the directory python.exe is in. On the contrary, PYTHONPATH is already defined by python itself to mean extra directories to use to import. So emerge is broken on many python installs. Instead, emerge should use something like EMERGE_PYTHON_PATH. Reproducible: Always
Git commit 3b54756595ead13414ba857ca59ae8820512e799 by Ralf Habacker. Committed on 22/03/2013 at 18:33. Pushed by habacker into branch 'kde-4.10'. use EMERGE_PYTHON_PATH instead of PYTHONPATH which may be predefined by python installs M +14 -7 kdeenv.bat http://commits.kde.org/emerge/3b54756595ead13414ba857ca59ae8820512e799
Git commit a9c3686338b7b865327283c4315e70e6fb9b5bba by Ralf Habacker. Committed on 22/03/2013 at 18:33. Pushed by habacker into branch 'master'. use EMERGE_PYTHON_PATH instead of PYTHONPATH which may be predefined by python installs M +14 -7 kdeenv.bat http://commits.kde.org/emerge/a9c3686338b7b865327283c4315e70e6fb9b5bba
Additionally to ralfs changes I've changed the kdesettings default to use EMERGE_PYTHON_PATH as Devin correctly pointed out that the old PYTHONPATH variable was wrong. Now Pythonpath is only used as a fallback for old kdesettings versions where it is still set. It is now also read after kdesettings.bat is executed. This fixed my environment where PYTHONPATH was the only variable set and emerge failed to find python because kdesettings.bat was evalueted after the pythonpath was set in kdeenv.bat