Skip to content

Fix numpy include in rosidl_generator_py #23

Closed

Description

@Tobias-Fischer

Currently finds the system numpy

Activity

  1. Tobias-Fischer commented on Jul 20, 2021

    @Tobias-Fischer
    ContributorAuthor

    See Tobias-Fischer/rosidl_python@1c35379 for a potential solution. What do you think @wolfv @traversaro?

  2. wolfv commented on Jul 20, 2021

    @wolfv
    Member

    I think @tfoote was also looking into this yesterday. Maybe he's got an opinion

  3. traversaro commented on Jul 20, 2021

    @traversaro
    Member

    See Tobias-Fischer/rosidl_python@1c35379 for a potential solution. What do you think @wolfv @traversaro?

    FindPythonInterp is deprecated at the CMake level, and FindPython3 is instead the recommended way to go, see https://cmake.org/cmake/help/v3.21/module/FindPythonInterp.html , so I fully agree!

  4. Tobias-Fischer commented on Jul 20, 2021

    @Tobias-Fischer
    ContributorAuthor

    I think the more critical fix is that currently the numpy path is only added on OSX and Win .. the change to FindPython3 is cosmetics on top ;)

  5. Tobias-Fischer commented on Jul 20, 2021

    @Tobias-Fischer
    ContributorAuthor

    Should have mentioned this earlier

  6. traversaro commented on Jul 20, 2021

    @traversaro
    Member

    Ahh, that was a tricky one. In any case it make sense.

  7. tfoote commented on Jul 20, 2021

    @tfoote

    I believe that this is the right fix. The additional path is the critical part, but the new API is much cleaner.

    Jumping to the Python3 find logic is much cleaner. I'm confirming with @cottsay whether or not the minimum of 3.14 is ok to use(That's when the new api was added https://cmake.org/cmake/help/latest/module/FindPython3.html#result-variables )

    As of Galactic only RHEL is a supported platform that doesn't have a new enough CMake Version:
    https://www.ros.org/reps/rep-2000.html#id38 to jump forward. And they may have a backports available or we can move forward.

  8. tfoote commented on Jul 20, 2021

    @tfoote

    It looks like RHEL 8.4 is using CMake 3.18 so we should be able to push forward. @cottsay will be working to update the REP.

    Edit: PR for the REP: ros-infrastructure/rep#323

  9. Tobias-Fischer commented on Jul 20, 2021

    @Tobias-Fischer
    ContributorAuthor

    This seems to be working nicely now:
    -- Using numpy include directory: $PREFIX/lib/python3.8/site-packages/numpy/core/include

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions