Skip to content

Commit

Permalink
Revert "-e install rcb4 in virtualenv (#17)"
Browse files Browse the repository at this point in the history
This reverts commit 47df54d.
  • Loading branch information
iory committed Apr 24, 2024
1 parent a04b5b0 commit 017d4b9
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions ros/kxr_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ endif()
get_filename_component(RCB4_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../.." ABSOLUTE)
message(STATUS "RCB4 Directory: ${RCB4_DIR}")

# Command to copy the modified requirements.in to requirements.in.with_rcb4
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/requirements.in ${CMAKE_CURRENT_SOURCE_DIR}/requirements.in.with_rcb4 COPYONLY)
file(APPEND ${CMAKE_CURRENT_SOURCE_DIR}/requirements.in.with_rcb4 "${RCB4_DIR}\n")

find_package(catkin REQUIRED COMPONENTS
catkin_virtualenv
actionlib
Expand Down Expand Up @@ -52,29 +56,13 @@ catkin_package(
)

catkin_generate_virtualenv(
INPUT_REQUIREMENTS requirements.in
INPUT_REQUIREMENTS requirements.in.with_rcb4
PYTHON_INTERPRETER python3
USE_SYSTEM_PACKAGES TRUE
ISOLATE_REQUIREMENTS FALSE
CHECK_VENV FALSE
)

set(_python "${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/venv/bin/python")
set(_venv_setup "${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/venv/bin/activate")

add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/after_venv_script"
COMMAND echo "${_python} -m pip install ${RCB4_DIR}"
COMMAND . ${_venv_setup} && ${_python} -m pip install ${RCB4_DIR}
DEPENDS ${PROJECT_NAME}_generate_virtualenv ${_venv_setup} ${_python}
)


add_custom_target(
run_after_venv ALL
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/after_venv_script"
)

include_directories(
include
${catkin_INCLUDE_DIRS}
Expand Down

0 comments on commit 017d4b9

Please sign in to comment.