From 4fcb6c29370d91bad7804ce895e85d52484f607a Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Fri, 9 Mar 2018 18:35:37 +0900 Subject: [PATCH] update to use catkin_virtualenv As I commented on https://github.com/pyros-dev/catkin_pip/issues/109#issuecomment-367290971, chanier_virtualenv seems better in terms of our requirement --- CMakeLists.txt | 22 ++++++++++++++++------ package.xml | 10 +++++++--- requirements.txt | 1 + 3 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 requirements.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index bbefced..7dfa708 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,21 @@ cmake_minimum_required(VERSION 2.8.12) project(chainercv) -find_package(catkin REQUIRED COMPONENTS catkin_pip) +# Make sure to find-package `catkin_virtualenv` +find_package(catkin REQUIRED catkin_virtualenv) -# defining current package as a package that should be managed by pip (not catkin - even though we make it usable with workspaces) -catkin_pip_package_virtualenv(${PROJECT_NAME}) -# CAREFUL : all projects for test here will share the same workspace. pip might have conflicts... +# Must be called before catkin_generate_virtualenv +catkin_package() -# # We need to install the project pip dependencies in the devel workspace being created -# catkin_pip_requirements(${CMAKE_CURRENT_SOURCE_DIR}/requirements.txt) +# Generate the virtualenv, optionally with python 3 as the default interpreter: +catkin_generate_virtualenv() +# catkin_generate_virtualenv(PYTHON3) + +# Make sure your python executables are installed using `catkin_install_python`: +catkin_install_python( + PROGRAMS + scripts/ssd_demo.py + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) + +install(FILES requirements.txt + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) diff --git a/package.xml b/package.xml index 871aea9..910ff97 100644 --- a/package.xml +++ b/package.xml @@ -3,14 +3,18 @@ chainercv 0.0.1 - ChainerCV with Catkin + ChainerCV ROS Interface - AlexV + Yusuke Niitani Yusuke Niitani MIT https://github.com/yuyu2172/chainercv-ros.git catkin - catkin_pip + catkin_virtualenv + + + requirements.txt + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4dd4e89 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +chainercv>=0.8