From b105a9e3c8edbfc66f15ad11443d3adf6a92c96e Mon Sep 17 00:00:00 2001 From: seanyen Date: Wed, 18 Mar 2020 22:25:01 -0700 Subject: [PATCH 1/2] accommodate different drives. --- cmake/templates/python_distutils_install.bat.in | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/cmake/templates/python_distutils_install.bat.in b/cmake/templates/python_distutils_install.bat.in index 6e87f5d7e..895ccbb78 100644 --- a/cmake/templates/python_distutils_install.bat.in +++ b/cmake/templates/python_distutils_install.bat.in @@ -7,14 +7,19 @@ if DEFINED DESTDIR ( cd "@INSTALL_CMD_WORKING_DIRECTORY@" -mkdir "@CMAKE_INSTALL_PREFIX@\@PYTHON_INSTALL_DIR@" +mkdir "@SETUPTOOLS_INSTALL_PREFIX@\@PYTHON_INSTALL_DIR@" -set "PYTHONPATH=@CMAKE_INSTALL_PREFIX@\@PYTHON_INSTALL_DIR@;@CMAKE_BINARY_DIR@\@PYTHON_INSTALL_DIR@" +set "PYTHONPATH=@SETUPTOOLS_INSTALL_PREFIX@\@PYTHON_INSTALL_DIR@;@CMAKE_BINARY_DIR@\@PYTHON_INSTALL_DIR@" set "CATKIN_BINARY_DIR=@CMAKE_BINARY_DIR@" +for /f "usebackq tokens=*" %%a in ('@SETUPTOOLS_INSTALL_PREFIX@') do ( + set _SETUPTOOLS_INSTALL_PATH=%%~pna + set _SETUPTOOLS_INSTALL_ROOT=%%~da +) + "@PYTHON_EXECUTABLE@" ^ "@CMAKE_CURRENT_SOURCE_DIR@\setup.py" ^ build --build-base "@CMAKE_CURRENT_BINARY_DIR@" ^ install %DESTDIR_ARG% @SETUPTOOLS_ARG_EXTRA@ ^ - --prefix="@SETUPTOOLS_INSTALL_PREFIX@" ^ - --install-scripts="@SETUPTOOLS_INSTALL_PREFIX@\@CATKIN_GLOBAL_BIN_DESTINATION@" ^ - --root=\ + "--prefix=%_SETUPTOOLS_INSTALL_PATH%" ^ + "--install-scripts=%_SETUPTOOLS_INSTALL_PATH%\@CATKIN_GLOBAL_BIN_DESTINATION@" ^ + --root=%_SETUPTOOLS_INSTALL_ROOT%\ From c902d2a3653aba7ae52d22cb4fc1ecebc0fb3678 Mon Sep 17 00:00:00 2001 From: seanyen Date: Wed, 18 Mar 2020 22:41:01 -0700 Subject: [PATCH 2/2] revert extra changes. --- cmake/templates/python_distutils_install.bat.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/templates/python_distutils_install.bat.in b/cmake/templates/python_distutils_install.bat.in index 895ccbb78..f0282a793 100644 --- a/cmake/templates/python_distutils_install.bat.in +++ b/cmake/templates/python_distutils_install.bat.in @@ -20,6 +20,6 @@ for /f "usebackq tokens=*" %%a in ('@SETUPTOOLS_INSTALL_PREFIX@') do ( "@CMAKE_CURRENT_SOURCE_DIR@\setup.py" ^ build --build-base "@CMAKE_CURRENT_BINARY_DIR@" ^ install %DESTDIR_ARG% @SETUPTOOLS_ARG_EXTRA@ ^ - "--prefix=%_SETUPTOOLS_INSTALL_PATH%" ^ - "--install-scripts=%_SETUPTOOLS_INSTALL_PATH%\@CATKIN_GLOBAL_BIN_DESTINATION@" ^ + --prefix="%_SETUPTOOLS_INSTALL_PATH%" ^ + --install-scripts="%_SETUPTOOLS_INSTALL_PATH%\@CATKIN_GLOBAL_BIN_DESTINATION@" ^ --root=%_SETUPTOOLS_INSTALL_ROOT%\