Skip to content

Conversation

@ahoarau
Copy link
Contributor

@ahoarau ahoarau commented Dec 11, 2025

This PR is a full rewrite of the CMake files with the JRL CMake Modules v2.

  • Full rewrite of the CMake Files in modern CMake
  • Remove submodules: archives can now be used
  • c++17 minimum required
  • Migrate python tests to pytest
  • Eigen 5 build fixes

@ahoarau ahoarau marked this pull request as draft December 11, 2025 16:38
@ManifoldFR ManifoldFR self-assigned this Dec 11, 2025
@ManifoldFR ManifoldFR self-requested a review December 11, 2025 21:54
@ahoarau ahoarau force-pushed the jrl-next branch 2 times, most recently from 551117d to 1c71142 Compare December 12, 2025 12:44
@ManifoldFR ManifoldFR marked this pull request as ready for review December 12, 2025 23:04
HEADERS ${nanoeigenpy_HEADERS}
BASE_DIRS include
)

Copy link
Member

Choose a reason for hiding this comment

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

There's a missing install directive for the main target ${PROJECT_NAME} I think. That's what breaks the pixi-build tests is my guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I build the binary dir (${CMAKE_BINARY_DIR}lib/site-packages/nanoeigenpy) just like the install space.
Then I just install the whole directory, including the nanoeigenpy target.

Copy link
Member

Choose a reason for hiding this comment

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

It seems it gets installed to lib/python{version}/site-packages/site-packages. I'll suggest a fix.

@ManifoldFR
Copy link
Member

We need to update the changelog. I suggest adding this in the ### Changed subsection:

- Switch to JRL CMake modules v2 ([#28](https://github.com/Simple-Robotics/nanoeigenpy/pull/28))

CMakeLists.txt Outdated
TARGETS ${PROJECT_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
LIBRARY DESTINATION ${Python_SITELIB}
DIRECTORY ${CMAKE_BINARY_DIR}/lib/site-packages
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
DIRECTORY ${CMAKE_BINARY_DIR}/lib/site-packages
DIRECTORY ${CMAKE_BINARY_DIR}/lib/site-packages/

This will ensure the contents of the directory, not the site-packages directory itself, gets installed at destination.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I wonder why it is not built in ${CMAKE_BINARY_DIR}/lib/site-packages/${PROJECT_NAME} like the other project I ported, but in ${CMAKE_BINARY_DIR}lib/site-packages.

Copy link
Member

@ManifoldFR ManifoldFR Dec 16, 2025

Choose a reason for hiding this comment

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

That's because for this project we had decided with @Lucas-Haubert to install the compiled library and stubs directly into the sitelib without a subdirectory with its own __init__ py file, because that file would do absolutely nothing in this instance - no wrapping or processing was required.

CMakeLists.txt Outdated
OUTPUT ${Python_SITELIB}/nanoeigenpy.pyi
PYTHON_PATH $<TARGET_FILE_DIR:nanoeigenpy>
)
if(nanobind_add_stub)
Copy link
Member

Choose a reason for hiding this comment

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

This condition doesn't work it seems.
The correct signature should be:

Suggested change
if(nanobind_add_stub)
if(COMMAND nanobind_add_stub)

@ManifoldFR
Copy link
Member

I don't understand why ROS-CI isn't working here. It seems templates don't work. Is it a C++ version issue or something? Or an upstream issue?

@jorisv

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