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

{common}{ros2} (Backport) Add ROS opt prefix to PYTHONPATH Kirkstone #1278

Closed

Conversation

dirksavage88
Copy link

{common}{ros2} Add ROS opt prefix to PYTHONPATH

This is a backport based on fixes made by @robwoolley on master. It allows users on kirkstone to build the ros2 interface packages that typically fail due to incorrect PYTHONPATH

In order for Python to find modules in the recipe-sysroot
we must add the path to PYTHONPATH.  However, we must prepend
the path to any previous values of PYTHONPATH.

We cannot refer to the variable in its own definition since
bitbake does not evaluate strings in that way.

Instead we must mimick python3targetconfig.bbclass and
prepend to the recipe tasks to conditionally set PYTHONPATH
in the shell context.

@dirksavage88 dirksavage88 changed the base branch from master to kirkstone January 6, 2025 18:07
@dirksavage88 dirksavage88 changed the title {common}{ros2} (Backport) Add ROS opt prefix to PYTHONPATH {common}{ros2} (Backport) Add ROS opt prefix to PYTHONPATH Kirkstone Jan 6, 2025
@robwoolley
Copy link
Collaborator

Thanks, @dirksavage88. I have merged it as 1d8513f

@robwoolley robwoolley closed this Jan 19, 2025
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.

2 participants