diff --git a/cmake/catkin-pip-package.cmake.in b/cmake/catkin-pip-package.cmake.in index bee9d6b..095c037 100644 --- a/cmake/catkin-pip-package.cmake.in +++ b/cmake/catkin-pip-package.cmake.in @@ -37,10 +37,6 @@ function(catkin_pip_python_setup) # Setting up variables for scripts configuration (in a function to keep it here) set(CATKIN_PIP_PACKAGE_PATH ${package_path}) - # sourcing envhooks to keep coherence between cmake run and shell run (especially for tests) - # DUPLICATED with catkin_pip_setup - #catkin_pip_runcmd(${CATKIN_PIP} install -e ${package_path} --no-dependencies --prefix "${CATKIN_DEVEL_PREFIX}") - # BEGIN : This is from catkin_python_setup # we follow same process but with slightly different scripts # @@ -99,10 +95,8 @@ function(catkin_pip_package package_name) # However : https://github.com/asmodehn/catkin_pip/issues/58 if(CATKIN_PIP_NO_DEPS) catkin_pip_install_devel_target(${package_name} ${package_path} --no-dependencies --ignore-installed) - #catkin_pip_runcmd(${CATKIN_PIP} install -e ${package_path} --no-dependencies --prefix "${CATKIN_DEVEL_PREFIX}" --ignore-installed) else() catkin_pip_install_devel_target(${package_name} ${package_path} --ignore-installed) - #catkin_pip_runcmd(${CATKIN_PIP} install -e ${package_path} --prefix "${CATKIN_DEVEL_PREFIX}" --ignore-installed) endif() if(NOT EXISTS ${package_path}/setup.py) diff --git a/cmake/catkin-pip-prefix.cmake.in b/cmake/catkin-pip-prefix.cmake.in index 95d1f9d..044360c 100644 --- a/cmake/catkin-pip-prefix.cmake.in +++ b/cmake/catkin-pip-prefix.cmake.in @@ -192,7 +192,7 @@ function(catkin_pip_setup_prefix ws_prefix) # To debug the python environment at this stage #catkin_pip_runcmd(${PYTHON_EXECUTABLE} -m site) - catkin_pip_runcmd(${CATKIN_PIP} install --ignore-installed -r "${CATKIN_PIP_REQUIREMENTS_PATH}/catkin-pip-fixups.req" --src ${CMAKE_SOURCE_DIR} --exists-action b --prefix "${ws_prefix}") + catkin_pip_runcmd(${CATKIN_PIP} install --ignore-installed -r "${CATKIN_PIP_REQUIREMENTS_PATH}/catkin-pip-fixups.req" --src ${CMAKE_SOURCE_DIR} --exists-action b --target "${ws_prefix}/@CATKIN_PIP_GLOBAL_PYTHON_DESTINATION@") unset(CATKIN_PIP) # now we can finally use the simple "pip" entry_point (forcing cmake to find it) diff --git a/cmake/catkin-pip-requirements.cmake.in b/cmake/catkin-pip-requirements.cmake.in index b2baf03..3481850 100644 --- a/cmake/catkin-pip-requirements.cmake.in +++ b/cmake/catkin-pip-requirements.cmake.in @@ -29,6 +29,6 @@ function(catkin_pip_requirements requirements_txt) catkin_pip_setup_prefix(${CATKIN_PIP_ENV}) # runnig the pip command (configure time) - catkin_pip_runcmd(${CATKIN_PIP} install ${ARGN} -r ${requirements_txt} --ignore-installed --src ${CMAKE_SOURCE_DIR} --exists-action b --prefix "${CATKIN_DEVEL_PREFIX}") + catkin_pip_runcmd(${CATKIN_PIP} install ${ARGN} -r ${requirements_txt} --ignore-installed --src ${CMAKE_SOURCE_DIR} --exists-action b --target "${CATKIN_DEVEL_PREFIX}/@CATKIN_PIP_GLOBAL_PYTHON_DESTINATION@") endfunction() diff --git a/cmake/catkin-pip-runcmd.cmake.in b/cmake/catkin-pip-runcmd.cmake.in index b07b9b1..32ca644 100644 --- a/cmake/catkin-pip-runcmd.cmake.in +++ b/cmake/catkin-pip-runcmd.cmake.in @@ -56,7 +56,7 @@ function(catkin_pip_install_devel_target package_name package_path) set(CATKIN_PIP_CMD ${CATKIN_ENV}) - set(CATKIN_PIP_CMD_ARGS_STR "flock ${CATKIN_PIP_ENV}/catkin_pip.lock ${CATKIN_PIP} install -e ${package_path} --prefix ${CATKIN_DEVEL_PREFIX} ${ARGN_STR}") + set(CATKIN_PIP_CMD_ARGS_STR "flock ${CATKIN_PIP_ENV}/catkin_pip.lock ${CATKIN_PIP} install ${package_path} --target ${CATKIN_DEVEL_PREFIX}/@CATKIN_PIP_GLOBAL_PYTHON_DESTINATION@ ${ARGN_STR}") # IF WE ARE PASSING EDITABLE PKG PATHS INTO PYTHONPATH we need to work around bug : # PYTHONPATH breaks pip install --editable Ref : https://github.com/pypa/pip/issues/4261 # set(CATKIN_PIP_CMD_ARGS_STR "-c 'export PYTHONPATH=${CATKIN_DEVEL_PREFIX}/${CATKIN_PIP_PYTHON_INSTALL_DIR}:${CATKIN_PIP_ENV}/${CATKIN_PIP_PYTHON_INSTALL_DIR}\; ${CATKIN_PIP_CMD_ARGS_STR}'")