Bug 317166 - emerge relies on PYTHONPATH; env variable already in use by Python
Summary: emerge relies on PYTHONPATH; env variable already in use by Python
Status: RESOLVED FIXED
Alias: None
Product: kde-windows
Classification: Miscellaneous
Component: buildsystem (show other bugs)
Version: 4.8
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KDE-Windows
URL: http://docs.python.org/3/using/cmdlin...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-22 03:17 UTC by Devin Jeanpierre
Modified: 2013-04-11 19:25 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Jeanpierre 2013-03-22 03:17:20 UTC
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
Comment 1 Ralf Habacker 2013-03-30 23:21:39 UTC
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
Comment 2 Ralf Habacker 2013-03-30 23:25:21 UTC
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
Comment 3 Andre Heinecke 2013-04-11 19:25:55 UTC
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