Skip to content

Commit 2fe9c4f

Browse files
committed
require python 3.11 for stubs generation
ROS Humble not supported
1 parent 02eb915 commit 2fe9c4f

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

CMakeLists.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,18 @@ if(BUILD_WITH_ACCELERATE_SUPPORT AND APPLE)
193193
target_compile_definitions(nanoeigenpy PRIVATE NANOEIGENPY_HAS_ACCELERATE)
194194
endif()
195195

196-
nanobind_add_stub(
197-
nanoeigenpy_stub
198-
VERBOSE
199-
MODULE nanoeigenpy
200-
OUTPUT ${CMAKE_BINARY_DIR}/lib/site-packages/nanoeigenpy.pyi
201-
PYTHON_PATH $<TARGET_FILE_DIR:nanoeigenpy>
202-
DEPENDS nanoeigenpy
203-
)
196+
# Stub generation requires typing-extensions
197+
# ROS Humble ships an incompatible typing-extensions with python3.10
198+
if(PYTHON_VERSION_MAJOR EQUAL 3 AND PYTHON_VERSION_MINOR GREATER_EQUAL 11)
199+
nanobind_add_stub(
200+
nanoeigenpy_stub
201+
VERBOSE
202+
MODULE nanoeigenpy
203+
OUTPUT ${CMAKE_BINARY_DIR}/lib/site-packages/nanoeigenpy.pyi
204+
PYTHON_PATH $<TARGET_FILE_DIR:nanoeigenpy>
205+
DEPENDS nanoeigenpy
206+
)
207+
endif()
204208

205209
jrl_python_compute_install_dir(python_install_dir)
206210
# NOTE: install the whole binary dir, we need the "/" at the end to copy the content.

0 commit comments

Comments
 (0)