ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The upcoming version of catkin allows you to consistently set the Python version being used within the build process (https://github.com/ros/catkin/issues/570). Therefore you have to specify the option -DPYTHON_VERSION=3.3 when invoking CMake the first time (the number refers to the suffix of the python executable, it could also be 3 only). This will address that all scripts during the build process are invoked with a specific Python version and packages which link against the Python libraries can pick the correct library version.

While Python scripts installed by the setup.py file have their shebang lines updated automatically other scripts installed from CMake are currently not updated like that. We will work on a CMake function which will perform the same shebang rewriting for files installed using this new function.

Regarding the "default" shebang line ROS is currently neither Ubuntu specific nor will we change the default invocation to python2. The "problem" here is that arch is actually not following the official Python guidelines described in http://www.python.org/dev/peps/pep-0394/ It clearly states that python should always point to a Python 2 interpreter (for very good reasons). ROS will follow this recommendation which is used by most of the distributions.

The upcoming version of catkin allows you to consistently set the Python version being used within the build process (https://github.com/ros/catkin/issues/570). Therefore you have to specify the option -DPYTHON_VERSION=3.3 when invoking CMake the first time (the number refers to the suffix of the python executable, it could also be 3 only). This will address that all scripts during the build process are invoked with a specific Python version and packages which link against the Python libraries can pick the correct library version.

While Python scripts installed by the setup.py file have their shebang lines updated automatically other scripts installed from CMake are currently not updated like that. We will work on a CMake function which will perform the same shebang rewriting for files installed using this new function.function (https://github.com/ros/catkin/pull/574).

Regarding the "default" shebang line ROS is currently neither Ubuntu specific nor will we change the default invocation to python2. The "problem" here is that arch is actually not following the official Python guidelines described in http://www.python.org/dev/peps/pep-0394/ It clearly states that python should always point to a Python 2 interpreter (for very good reasons). ROS will follow this recommendation which is used by most of the distributions.