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 FindPython3 instead of FindPythonInterp #355

Merged
merged 6 commits into from Aug 12, 2021

Conversation

sloretz
Copy link
Contributor

@sloretz sloretz commented Aug 5, 2021

Related to ros2/python_cmake_module#6

This is a work in progress that makes ament_cmake use FindPython3 instead of FindPythonInterp.

Requires ament/ament_package#134

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
@sloretz sloretz marked this pull request as ready for review August 9, 2021 22:57
@sloretz
Copy link
Contributor Author

sloretz commented Aug 9, 2021

Full CI including ament/ament_package#134

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@sloretz
Copy link
Contributor Author

sloretz commented Aug 10, 2021

Full CI again after ros2/ros2#1168

Copy link
Contributor

@ivanpauno ivanpauno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of packages have custom logic for windows debug, e.g. https://github.com/ros2/rclpy/blob/fbe9ad12b806345a3b3c0578af7e21d1d6bc7bea/rclpy/CMakeLists.txt#L36.

I would also run a Windows debug job, just in case.

ament_cmake/CMakeLists.txt Show resolved Hide resolved
ament_cmake_core/cmake/core/python.cmake Show resolved Hide resolved
@sloretz
Copy link
Contributor Author

sloretz commented Aug 11, 2021

A lot of packages have custom logic for windows debug, e.g. https://github.com/ros2/rclpy/blob/fbe9ad12b806345a3b3c0578af7e21d1d6bc7bea/rclpy/CMakeLists.txt#L36.

Full CI Windows Debug Build Status I'm expecting it to pass, since ament_cmake doesn't use python_cmake_module's FindPythonExtra which is what sets PYTHON_EXECUTABLE_DEBUG. I do anticipate needing to test that in ros2/python_cmake_module#7 though.

@sloretz
Copy link
Contributor Author

sloretz commented Aug 12, 2021

All 10 windows Debug test failures also occur in the Windows Debug nightly: https://ci.ros2.org/view/nightly/job/nightly_win_deb/2077/#showFailuresLink

@sloretz sloretz merged commit 0998713 into master Aug 12, 2021
@delete-merged-branch delete-merged-branch bot deleted the use_FindPython3_ament_cmake branch August 12, 2021 00:03
kenji-miyake pushed a commit to kenji-miyake/ament_cmake that referenced this pull request Oct 20, 2021
* First pass using FindPython3, no testing done

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Use config-time python to avoid CMP0087

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Set ament_package_PYTHON_EXECUTABLE

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* move getting executable path out of if block

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Fatal error if Python3::Interpreter not present

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Remove Python 2 logic

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
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