Files
spark/tools/buildspark.cmd
T
John Colvin 939f44b48c build: Refine build scripts so they work out of the box
* Automatically create python virtual envs
* Automatically actvate the vs dev prompt

Note: the python39 virtual env will remain active in the calling shell.
This behavior may be changed down the road.
2021-09-15 23:53:57 -04:00

32 lines
840 B
Batchfile

@echo off
if not exist %~dp0\..\.venv27 (
CALL :create_venv27
)
if not exist %~dp0\..\.venv39 (
CALL :create_venv39
)
touch %~dp0\..\src\lib\CMakeLists.txt
@call %~dp0\..\.venv39\Scripts\activate.bat
@call python %~dp0\..\tools\buildspark.py
EXIT /B %ERRORLEVEL%
:create_venv27
echo Creating python27 virtual environment
@call C:\Python27\Scripts\virtualenv %~dp0\..\.venv27
@call %~dp0\..\.venv27\Scripts\activate.bat
@call %~dp0\..\.venv27\Scripts\pip install -r %~dp0\..\requirements27.txt
@call deactivate
EXIT /B 0
:create_venv39
echo Creating python39 virtual environment
@call python -m venv %~dp0\..\.venv39
@call %~dp0\..\.venv39\Scripts\activate.bat
@call %~dp0\..\.venv39\Scripts\pip install -r %~dp0\..\requirements39.txt
@call deactivate
EXIT /B 0