added previous pipeline environment paths

This commit is contained in:
aardschok 2017-08-02 10:12:54 +02:00
parent 6d7262d26b
commit 62b92dfbb3
7 changed files with 612 additions and 0 deletions

30
python_environment.bat Normal file
View file

@ -0,0 +1,30 @@
@echo OFF
echo Entering Python environment...
set CB_PYTHON_VERSION=2.7
where /Q python.exe
if ERRORLEVEL 1 (
if EXIST C:\Python27\python.exe (
echo Adding C:\Python27 to PATH
set "PATH=%PATH%;C:\Python27"
goto:has-python
) else (
echo Adding embedded python (pipeline)
set "PATH=%PATH%;%CB_APP_SHARED%\python\standalone\%CB_PYTHON_VERSION%\bin"
goto:has-python
)
)
:has-python
:: Python universal (non-compiled)
set PYTHONPATH=%PYTHONPATH%;%CB_APP_SHARED%\python\universal\site-packages
:: Python version/windows-specific
:: set PYTHONPATH=%PYTHONPATH%;%CB_APP_SHARED%\python\win\%CB_PYTHON_VERSION%
:: Python standalone (compiled to version)
if NOT "%CB_PYTHON_STANDALONE%" == "0" (
echo Entering Python Standalone environment...
set PYTHONPATH=%PYTHONPATH%;%CB_APP_SHARED%\python\standalone\%CB_PYTHON_VERSION%\site-packages
)