@echo off

if DEFINED DESTDIR (
  echo "Destdir.............%DESTDIR%"
  set DESTDIR_ARG="--root=%DESTDIR%"
)

cd "C:/Users/ACL_KUKA2/archemist_ws/src/kern_pcb_balance/kern_pcb_balance_driver"

if NOT EXIST "C:\Users\ACL_KUKA2\archemist_ws\install\lib/site-packages\" (
  mkdir "C:\Users\ACL_KUKA2\archemist_ws\install\lib/site-packages"
)

set "PYTHONPATH=C:\Users\ACL_KUKA2\archemist_ws\install\lib/site-packages;C:/Users/ACL_KUKA2/archemist_ws/build\lib/site-packages"
set "CATKIN_BINARY_DIR=C:/Users/ACL_KUKA2/archemist_ws/build"
for /f "usebackq tokens=*" %%a in ('C:\Users\ACL_KUKA2\archemist_ws\install') do (
  set _SETUPTOOLS_INSTALL_PATH=%%~pna
  set _SETUPTOOLS_INSTALL_ROOT=%%~da
)

"C:/Users/ACL_KUKA2/miniconda3/envs/robostack/python.exe" ^
    "C:/Users/ACL_KUKA2/archemist_ws/src/kern_pcb_balance/kern_pcb_balance_driver\setup.py" ^
    build --build-base "C:/Users/ACL_KUKA2/archemist_ws/build/kern_pcb_balance/kern_pcb_balance_driver" ^
    install %DESTDIR_ARG%  ^
    --prefix="%_SETUPTOOLS_INSTALL_PATH%" ^
    --install-scripts="%_SETUPTOOLS_INSTALL_PATH%\bin" ^
    --root=%_SETUPTOOLS_INSTALL_ROOT%\
