From e8742b036cd976e807f109018e0697dd25b14ccd Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Fri, 13 May 2022 17:20:34 +0900 Subject: [PATCH 1/2] dialogflow_task_executive: re-enable idnigo following requirements.txt syntax is not support on 14.04 google-api-core[grpc]==1.31.5 # via google-cloud-language so we intentionally use requirements.txt To use this program, we need to run sed -i 's/upgrade_pip=True/upgrade_pip=False/' /opt/ros/indigo/share/catkin_virtualenv/cmake/build_venv.py to prevent upgrading to latest pip, which is not Python2 compatible --- dialogflow_task_executive/CMakeLists.txt | 19 ++++++++------ dialogflow_task_executive/requirements.txt | 29 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 dialogflow_task_executive/requirements.txt diff --git a/dialogflow_task_executive/CMakeLists.txt b/dialogflow_task_executive/CMakeLists.txt index 732d18053..1b4a3f6a9 100644 --- a/dialogflow_task_executive/CMakeLists.txt +++ b/dialogflow_task_executive/CMakeLists.txt @@ -1,13 +1,6 @@ cmake_minimum_required(VERSION 2.8.3) project(dialogflow_task_executive) -if($ENV{ROS_DISTRO} STREQUAL "indigo") - message(WARNING "following requirements.txt syntax is not support on 14.04") - message(WARNING "google-api-core[grpc]==1.31.5 # via google-cloud-language") - find_package(catkin) - catkin_package() - return() -endif() execute_process(COMMAND bash -c "gcc -dumpmachine" OUTPUT_VARIABLE gcc_dump_machine OUTPUT_STRIP_TRAILING_WHITESPACE) message("-- gcc dumpmachine returns ${gcc_dump_machine}") if(NOT gcc_dump_machine MATCHES "x86_64-.*") @@ -42,7 +35,17 @@ catkin_package( CATKIN_DEPENDS message_runtime ) -catkin_generate_virtualenv(INPUT_REQUIREMENTS requirements.in) +if("$ENV{ROS_DISTRO}" STREQUAL "indigo") + message(WARNING "following requirements.txt syntax is not support on 14.04") + message(WARNING "google-api-core[grpc]==1.31.5 # via google-cloud-language") + message(WARNING "so we intentionally use requirements.txt") + message(WARNING "To use this program, we need to run") + message(WARNING "sed -i 's/upgrade_pip=True/upgrade_pip=False/' /opt/ros/indigo/share/catkin_virtualenv/cmake/build_venv.py") + message(WARNING "to prevent upgrading to latest pip, which is not Python2 compatible") + catkin_generate_virtualenv() +else() + catkin_generate_virtualenv(INPUT_REQUIREMENTS requirements.in) +endif() file(GLOB NODE_SCRIPTS_FILES node_scripts/*.py) catkin_install_python( diff --git a/dialogflow_task_executive/requirements.txt b/dialogflow_task_executive/requirements.txt new file mode 100644 index 000000000..b584b1f1f --- /dev/null +++ b/dialogflow_task_executive/requirements.txt @@ -0,0 +1,29 @@ +#### +#### this is only sed for indigo (pr2) +#### +#### kinetic+ users will use requirements.in +#### +pyparsing==2.2.0 +# +dialogflow==0.3.0 +# +cachetools==0.2.0 +certifi==2017.7.27.1 +chardet==3.0.4 +futures==3.2.0 +google-api-core==1.12.0 +google-auth==1.6.3 +google-auth-httplib2==0.0.3 +googleapis-common-protos==1.6.0 +httplib2==0.14.0 +idna==2.6 +protobuf==3.12.2 +pyasn1==0.4.3 +pyasn1-modules +pytz==2017.2 +requests==2.18.4 +rsa==3.4.2 +setuptools==40.3.0 +six==1.11.0 +urllib3==1.22 + From 30585ce89ae0eaaf5e86185908f47e54bd2ee4b3 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Fri, 13 May 2022 21:10:43 +0900 Subject: [PATCH 2/2] dialogflow_task_executive/CMakeLists.txt: [indigo] copy requirement.txt.indigo to requirement before running catkin_generate_virtualenv() --- dialogflow_task_executive/CMakeLists.txt | 2 ++ .../{requirements.txt => requirements.txt.indigo} | 0 2 files changed, 2 insertions(+) rename dialogflow_task_executive/{requirements.txt => requirements.txt.indigo} (100%) diff --git a/dialogflow_task_executive/CMakeLists.txt b/dialogflow_task_executive/CMakeLists.txt index 1b4a3f6a9..f645d8c10 100644 --- a/dialogflow_task_executive/CMakeLists.txt +++ b/dialogflow_task_executive/CMakeLists.txt @@ -42,6 +42,8 @@ if("$ENV{ROS_DISTRO}" STREQUAL "indigo") message(WARNING "To use this program, we need to run") message(WARNING "sed -i 's/upgrade_pip=True/upgrade_pip=False/' /opt/ros/indigo/share/catkin_virtualenv/cmake/build_venv.py") message(WARNING "to prevent upgrading to latest pip, which is not Python2 compatible") + file(COPY requirements.txt.indigo DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/requirements.txt.indigo requirements.txt) catkin_generate_virtualenv() else() catkin_generate_virtualenv(INPUT_REQUIREMENTS requirements.in) diff --git a/dialogflow_task_executive/requirements.txt b/dialogflow_task_executive/requirements.txt.indigo similarity index 100% rename from dialogflow_task_executive/requirements.txt rename to dialogflow_task_executive/requirements.txt.indigo