Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only generate stubs on linux #124

Merged
merged 1 commit into from
Sep 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ set_target_properties(${COPC_PYTHON_LIB} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/copclib
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/copclib)

add_custom_command(TARGET ${COPC_PYTHON_LIB} POST_BUILD
COMMAND stubgen -m _core -o .
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/copclib
COMMENT "Generating stubs for pybind"
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/copclib/_core.pyi DESTINATION .)
if(UNIX AND NOT APPLE)
add_custom_command(TARGET ${COPC_PYTHON_LIB} POST_BUILD
COMMAND stubgen -m _core -o .
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/copclib
COMMENT "Generating stubs for pybind"
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/copclib/_core.pyi DESTINATION .)
endif()

if(WITH_TESTS)
include(DownloadExampleFiles)
Expand Down