|
From: <oli...@us...> - 2014-02-24 14:16:33
|
Revision: 2653
http://sourceforge.net/p/edk2-buildtools/code/2653
Author: oliviermartin
Date: 2014-02-24 14:16:30 +0000 (Mon, 24 Feb 2014)
Log Message:
-----------
BaseTools/toolsetup.bat: Basetools corrupts PYTHONPATH
The PYTHONPATH variable is used globally by Python, but is corrupted by toolsetup.bat
that means that downstream invocation of python scripts may fail as they will
not be able to find library modules.
The basic fix is to use set PYTHONPATH=%BASETOOLS_PYTHON_SOURCE%;%PYTHONPATH%
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <oli...@ar...>
Reviewed-by Yingke Liu <yin...@in...>
Modified Paths:
--------------
trunk/BaseTools/toolsetup.bat
Modified: trunk/BaseTools/toolsetup.bat
===================================================================
--- trunk/BaseTools/toolsetup.bat 2014-02-24 14:07:06 UTC (rev 2652)
+++ trunk/BaseTools/toolsetup.bat 2014-02-24 14:16:30 UTC (rev 2653)
@@ -246,7 +246,8 @@
)
set PATH=%BASE_TOOLS_PATH%\Bin\Win32;%PATH%
- set PYTHONPATH=%BASE_TOOLS_PATH%\Source\Python
+ set BASETOOLS_PYTHON_SOURCE=%BASE_TOOLS_PATH%\Source\Python
+ set PYTHONPATH=%BASETOOLS_PYTHON_SOURCE%;%PYTHONPATH%
if not defined PYTHON_HOME (
if defined PYTHONHOME (
@@ -279,8 +280,9 @@
echo !!! WARNING !!! Will not be able to compile Python programs to .exe
echo Will setup environment to run Python scripts directly.
echo.
- set PYTHONPATH=%BASE_TOOLS_PATH%\Source\Python
- set PATH=%PYTHONPATH%\build;%PYTHONPATH%\GenFds;%PYTHONPATH%\Trim;%PATH%
+ set PATH=%BASETOOLS_PYTHON_SOURCE%\Trim;%PATH%
+ set PATH=%BASETOOLS_PYTHON_SOURCE%\GenFds;%PATH%
+ set PATH=%BASETOOLS_PYTHON_SOURCE%\build;%PATH%
set PATHEXT=%PATHEXT%;.py
)
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|