build: in new container build would fail because of missing python package this fixes it
This commit is contained in:
1 parent
eb0d0c5244
commit
6b6f34288d
1 file changed
+7
-1
@@ -40,7 +40,13 @@ function(init_python_module)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/stubs/${_name}.pyi
|
||||
DEPENDS ${_name} ${module_proj}
|
||||
COMMAND PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR} pybind11-stubgen --numpy-array-use-type-var --ignore-invalid-expressions '.*' ${_name}_module
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E env
|
||||
"PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
||||
${Python3_EXECUTABLE} -m pybind11_stubgen
|
||||
--numpy-array-use-type-var
|
||||
--ignore-invalid-expressions '.*'
|
||||
${_name}_module
|
||||
COMMENT "Generating py stubs"
|
||||
)
|
||||
add_custom_target(
|
||||
|
||||
Reference in new issue
Block a user