Activate Python virtual environment on Windows during configuration

This commit is contained in:
Dan Paulat 2025-05-28 19:59:14 -05:00
parent ac475999f5
commit 0e90f8a7a1
10 changed files with 95 additions and 8 deletions

View file

@ -5,7 +5,8 @@
-DCMAKE_PREFIX_PATH="%qt_base%/%qt_version%/%qt_arch%" ^
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="%script_dir%\..\..\external\cmake-conan\conan_provider.cmake" ^
-DCONAN_HOST_PROFILE=%conan_profile% ^
-DCONAN_BUILD_PROFILE=%conan_profile%
-DCONAN_BUILD_PROFILE=%conan_profile% ^
-DSCWX_VENV_PATH=%venv_path%
@if defined build_type (
set cmake_args=%cmake_args% ^

View file

@ -3,7 +3,15 @@
:: Import common paths
@call %script_dir%\common-paths.bat
:: Activate Python Virtual Environment
@if defined venv_path (
echo Activating Python Virtual Environment: %venv_path%
python -m venv %venv_path%
call %venv_path%\Scripts\activate.bat
)
:: Install Python packages
python -m pip install --upgrade pip
pip install --upgrade -r "%script_dir%\..\..\requirements.txt"
@if defined build_type (
@ -24,3 +32,6 @@ pip install --upgrade -r "%script_dir%\..\..\requirements.txt"
:: Run CMake Configure
@call %script_dir%\run-cmake-configure.bat
:: Deactivate Python Virtual Environment
@call %venv_path%\Scripts\deactivate.bat