catkin icon indicating copy to clipboard operation
catkin copied to clipboard

catkin_install_python does not insert shebang line

Open scotgopal opened this issue 1 year ago • 1 comments

According to the documentation in http://docs.ros.org/en/jade/api/catkin/html/howto/format2/installing_python.html, catkin_install_python should add shebang line.

However, I don't see the shebang lines being added after doing catkin config --install && catkin build. The following ws contains a MWE project that i used for testing.

Folder structure:

❯ tree test_catkin_ws/
test_catkin_ws/
└── src
    └── test_project
        ├── CMakeLists.txt
        ├── package.xml
        └── test.py

2 directories, 3 files

test_catkin_ws.zip

scotgopal avatar May 27 '23 20:05 scotgopal

What catkin_install_python does is modify the shebang line to use the specific Python version used at configure time. So for example you have a shebang with Python 2, and you have Python 3 configured, it'll update the shebang in install space to Python 3.

Rayman avatar May 28 '23 20:05 Rayman