Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 85

how is the PYTHON_EXECUTABLE variable/option is set with catkin? how can i set its default?

$
0
0
I know that the "python-problem" in arch linux is already known, and i don't like it. I've managed to install ros-hydro from source in my arch, which took a lot of time for me. I've replaced all calls to python for a explicit python2 call with grep and sed, like this: grep -rl ./ "/bin/env python" | xargs sed -i 's/env python/env python2/g' "#!/bin/env python" -> "#!/bin/env python2". But, even with that, i had to set the option -DPYTHON_EXECUTABLE=python2 manually on the command line. I've tried to figure out how i could set some kind of default in the sources, so i put this line on the "python.cmake" file, in catkin/cmake/: set(PYTHON_EXECUTABLE python2). that works fine, but it just doesn't seem the correct way to do it, because if i do the following to build ros: ./src/catkin/bin/catkin_make_isolated -DPYTHON_EXECUTABLE=python3.3 for example, it builds normally, like if PYTHON_EXECUTABLE option became constant somehow. could someone explain me how this variable is set, and how i could make this solution seem more "correct"... and, why doesn't the official sources make explicit calls for python2, instead of python? wouldn't that make ros more portable? I also don't like the way it feels like the only supported platform is ubuntu.

Viewing all articles
Browse latest Browse all 85

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>