Skip to content

Replace CMake Python variables with new ones from FindPython3 module#402

Merged
azeey merged 14 commits intogazebosim:ign-math6from
Bi0T1N:cmake_python3_fixes
Oct 6, 2023
Merged

Replace CMake Python variables with new ones from FindPython3 module#402
azeey merged 14 commits intogazebosim:ign-math6from
Bi0T1N:cmake_python3_fixes

Conversation

@Bi0T1N
Copy link
Copy Markdown
Contributor

@Bi0T1N Bi0T1N commented Apr 2, 2022

🦟 Bug fix

Fixes #401

Summary

Replaces the old variables with the new ones used by the FindPython3 module. Right now IgnPython cannot be used as it only searches for the interpreter but pybind11 also needs the development components, thus it provides a workaround. The Win32 PYTHON_LIBRARIES (PYTHON_DEBUG_LIBRARIES) variable was also removed as there is no equivalent in the new CMake module for getting the debug libraries.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2022

Codecov Report

Merging #402 (d9a2a5c) into ign-math6 (4fbd3c8) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           ign-math6     #402   +/-   ##
==========================================
  Coverage      99.65%   99.65%           
==========================================
  Files             67       67           
  Lines           6392     6392           
==========================================
  Hits            6370     6370           
  Misses            22       22           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4fbd3c8...d9a2a5c. Read the comment docs.

@chapulina chapulina added the scripting Scripting interfaces to Ignition label Apr 4, 2022
@chapulina chapulina requested a review from j-rivero April 11, 2022 18:45
Copy link
Copy Markdown
Contributor

@j-rivero j-rivero left a comment

Choose a reason for hiding this comment

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

Mostly fine, a couple of small things

@chapulina
Copy link
Copy Markdown
Contributor

Hi @Bi0T1N , thank you for the contribution. Are you still interested in moving on with this PR?

@Bi0T1N
Copy link
Copy Markdown
Contributor Author

Bi0T1N commented Jun 11, 2022

Hi @Bi0T1N , thank you for the contribution. Are you still interested in moving on with this PR?

Sure, but I don't have time for that now. I'll try to come back to this over the next few weeks as I should have more time soon.

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 14, 2022

Codecov Report

Merging #402 (22d802a) into ign-math6 (6276839) will not change coverage.
The diff coverage is n/a.

❗ Current head 22d802a differs from pull request most recent head 43b40dd. Consider uploading reports for the commit 43b40dd to get more accurate results

@@            Coverage Diff             @@
##           ign-math6     #402   +/-   ##
==========================================
  Coverage      99.38%   99.38%           
==========================================
  Files             75       75           
  Lines           7029     7029           
==========================================
  Hits            6986     6986           
  Misses            43       43           

Bi0T1N added 5 commits July 1, 2022 22:17
there is no equivalent variable in the new FindPython3
module that provides the path to debug libraries

Signed-off-by: Bi0T1N <Bi0T1N@users.noreply.github.com>
Signed-off-by: Bi0T1N <Bi0T1N@users.noreply.github.com>
- cannot use IgnPython because it doesn't allow to
specify the components to be found
- old code probably don't work on old CMake versions < 3.12
as the required FindPython3 module doesn't exist

Signed-off-by: Bi0T1N <Bi0T1N@users.noreply.github.com>
This reverts commit 76ffaee.

Signed-off-by: Bi0T1N <Bi0T1N@users.noreply.github.com>
Signed-off-by: Bi0T1N <Bi0T1N@users.noreply.github.com>
@chapulina chapulina added the bug Something isn't working label Jul 23, 2022
@Bi0T1N
Copy link
Copy Markdown
Contributor Author

Bi0T1N commented Dec 17, 2022

What is the status on this from your side? Should I update it to match the new gz naming and we merge it or abandon it?

@scpeters
Copy link
Copy Markdown
Member

scpeters commented May 9, 2023

I just resolved the conflicts and will continue review. Thanks for your patience and your help with pull request reviews!

@azeey azeey self-requested a review June 14, 2023 21:28
@azeey azeey added the beta Targeting beta release of upcoming collection label Jul 31, 2023
Bi0T1N and others added 5 commits August 19, 2023 21:38
Signed-off-by: Bi0T1N <Bi0T1N@users.noreply.github.com>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
# the code below can be removed; e.g. pybind needs Interpreter and Development components
# see https://pybind11.readthedocs.io/en/stable/cmake/index.html#new-findpython-mode
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
set(IGN_PYTHON_VERSION "3")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I added IGN_PYTHON_VERSION "3" here to make it work. It turns out Bionic doesn't have pybind11 2.2 anyway, so this would only be useful for users that build pybind11 from source on Bionic.

@azeey
Copy link
Copy Markdown
Contributor

azeey commented Aug 22, 2023

@j-rivero I believe your requested changes have been resolved. Can you take a look?

@azeey
Copy link
Copy Markdown
Contributor

azeey commented Aug 29, 2023

Removing beta to avoid needing a release and forward ports. This will be merged right after Harmonic is released.

@azeey azeey removed the beta Targeting beta release of upcoming collection label Aug 29, 2023
Copy link
Copy Markdown
Contributor

@j-rivero j-rivero left a comment

Choose a reason for hiding this comment

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

@j-rivero I believe your requested changes have been resolved. Can you take a look?

Sorry for the late response, should be good to go.

@azeey azeey merged commit ea9ae34 into gazebosim:ign-math6 Oct 6, 2023
@Bi0T1N Bi0T1N deleted the cmake_python3_fixes branch October 7, 2023 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working 🏰 citadel Ignition Citadel 🏯 fortress Ignition Fortress Gazebo 1️1️ Dependency of Gazebo classic version 11 scripting Scripting interfaces to Ignition

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Regression of python tests in Jammy CI - "Could not find executable"

6 participants