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

Add in ros_python_version. #4

Merged
merged 3 commits into from
May 18, 2018
Merged

Add in ros_python_version. #4

merged 3 commits into from
May 18, 2018

Conversation

clalancette
Copy link
Contributor

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
CMakeLists.txt Outdated
@@ -7,6 +7,13 @@ catkin_package()
set(ROS_VERSION "1")
set(ROS_DISTRO "melodic")

set(ROS_PY_VER "$ENV{ROS_PYTHON_VERSION}")
if(ROS_PY_VER)
set(ROS_PYTHON_VERSION "${ROS_PY_VER}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to change this to the following to avoid the temporary variable:

if(DEFINED ENV{VAR})
  set(ROS_PYTHON_VERSION "$ENV{ROS_PYTHON_VERSION}")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, done in ecffcd0

@dirk-thomas
Copy link
Member

I think this should be added to REP 149 too.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette
Copy link
Contributor Author

I think this should be added to REP 149 too.

Will do.

Copy link
Member

@dirk-thomas dirk-thomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@clalancette clalancette merged commit aadb8e6 into melodic May 18, 2018
@clalancette clalancette deleted the melodic-py3 branch May 18, 2018 18:11
johnsonshih added a commit to johnsonshih/ros_environment that referenced this pull request Oct 4, 2018
dirk-thomas pushed a commit that referenced this pull request Jan 26, 2019
….em (#13)

* Update env. hook batch file to set ros_package_path correctly (#1)

* Get ROS_PACKAGE_PATH from the python  (#2)

* Get ROS_PACKAGE_PATH from the python

* normcase workspace path and eliminate duplicate entries

* Preserve the content from CMAKE_PREFIX_PATH and remove duplicate entries (#4)

* use set to remove duplicate entries in a list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants