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

Proposal: Use PlatformIO Python in colcon build #108

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions microros_utils/library_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def download_dev_environment(self):

def build_dev_environment(self):
print("Building micro-ROS dev dependencies")
command = "cd {} && . {} && colcon build --cmake-args -DBUILD_TESTING=OFF".format(self.dev_folder, self.python_env)
command = "cd {} && . {} && colcon build --cmake-args -DBUILD_TESTING=OFF -DPython3_EXECUTABLE=`which python`".format(self.dev_folder, self.python_env)
result = run_cmd(command, env=self.env)

if 0 != result.returncode:
Expand Down Expand Up @@ -174,7 +174,7 @@ def build_mcu_environment(self, meta_file, toolchain_file, user_meta = ""):
print("Building micro-ROS library")

common_meta_path = self.library_folder + '/metas/common.meta'
colcon_command = '. {} && colcon build --merge-install --packages-ignore-regex=.*_cpp --metas {} {} {} --cmake-args -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=OFF -DTHIRDPARTY=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE={}'.format(self.python_env, common_meta_path, meta_file, user_meta, toolchain_file)
colcon_command = '. {} && colcon build --merge-install --packages-ignore-regex=.*_cpp --metas {} {} {} --cmake-args -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=OFF -DTHIRDPARTY=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE={} -DPython3_EXECUTABLE=`which python`'.format(self.python_env, common_meta_path, meta_file, user_meta, toolchain_file)
command = "cd {} && . {}/install/setup.sh && {}".format(self.mcu_folder, self.dev_folder, colcon_command)
result = run_cmd(command, env=self.env)

Expand Down