Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to replace --prefix with --target #122

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions cmake/catkin-pip-package.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmake/catkin-pip-prefix.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmake/catkin-pip-requirements.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion cmake/catkin-pip-runcmd.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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}'")
Expand Down