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
Catkin plugin: Use in-snap python instead of OS-provided. #232
Catkin plugin: Use in-snap python instead of OS-provided. #232
Conversation
a5d426f
to
bf88521
Compare
pattern = re.compile(r'#!.*python') | ||
for root, directories, files in os.walk(self.rosdir): | ||
for fileName in files: | ||
with open(os.path.join(root, fileName), 'r+') as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would extract this into a method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which part exactly-- the walking bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first, the code inside the second for.
Then, maybe the two fors too, but this might be too much.
bf88521
to
4689cc4
Compare
|
Once that is fixed you will run into:
Due to the global regexing (I guess) |
4689cc4
to
d090cf7
Compare
@sergiusens oops, knew I did that refactor too quickly. And no, the reason roscore has that clean step as well is to avoid just that. |
This works pre-Xenial since python2 is provided on the image. However, it's been removed in Xenial which uncovered this bug. The fix simply rewrites all /usr/bin/python shebangs to use /usr/bin/env python, and also fixes up 10.ros.sh to use python from the path instead of /usr/bin/python. LP: #1533297 Signed-off-by: Kyle Fazzari <kyle@canonical.com>
d090cf7
to
31b745f
Compare
Catkin plugin: Use in-snap python instead of OS-provided.
…n_on_rolling Catkin plugin: Use in-snap python instead of OS-provided.
This works pre-Xenial since python2 is provided on the image. However, it's been removed in Xenial which uncovered this bug. The fix simply rewrites all /usr/bin/python shebangs to use /usr/bin/env python, and also fixes up 10.ros.sh to use python from the path instead of /usr/bin/python.
LP: #1533297