Skip to content

How to stubs with editable install? #537

Answered by nurpax
kj4tmp asked this question in Q&A
Discussion options

You must be logged in to vote

I'm doing something similar and this seems to work for me:

nanobind_add_stub(
  imgui_ext_stub
  MODULE imgui_ext
  OUTPUT "${CMAKE_SOURCE_DIR}/src/imgui/imgui_ext.pyi"
  PYTHON_PATH $<TARGET_FILE_DIR:imgui_ext>
  DEPENDS imgui_ext
  INCLUDE_PRIVATE
)

install(TARGETS imgui_ext LIBRARY DESTINATION imgui)
install(FILES "${CMAKE_SOURCE_DIR}/src/imgui/imgui_ext.pyi" DESTINATION imgui)

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@kj4tmp
Comment options

@kj4tmp
Comment options

@kj4tmp
Comment options

@nurpax
Comment options

Answer selected by kj4tmp
@kj4tmp
Comment options

@ianhbell
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants