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

Use PYTHON_EXECUTABLE to generate config headers. #146

Merged
merged 2 commits into from
Mar 5, 2020

Conversation

mikepurvis
Copy link
Member

@mikepurvis mikepurvis commented Feb 1, 2020

All current .cfg files in the wild are executable and have shebang lines. Unfortunately, because they are invoked at build time, this is another instance where the specific python that usr/bin/env python leads to becomes important, especially in an environment like Ubuntu Focal, where python is Python 2 (and may not even exist at all).

In this case, it's easy to address— call the correct interpreter directly in the wrapper generated by configure_file. The Windows version already does something similar, so I've updated it to also use the PYTHON_EXECUTABLE cmake var rather than just python.

See related discussions in ros/catkin#1044, ros/ros_comm#1830, ros/roslisp#43

FYI @dirk-thomas

@mikepurvis mikepurvis changed the title Use PYTHON_EXECUTABLE to generate parameters. Use PYTHON_EXECUTABLE to generate config headers. Feb 1, 2020
@mjcarroll mjcarroll merged commit 7e89305 into ros:melodic-devel Mar 5, 2020
@mikepurvis mikepurvis deleted the excise-env-python branch March 5, 2020 21:42
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.

None yet

2 participants