Skip to content

Commit

Permalink
Merge branch 'bugfix/stubgen' into 'main'
Browse files Browse the repository at this point in the history
Fixes stub generation when pybind11-stuben fails

See merge request njoy/ACEtk!3
  • Loading branch information
Timothy Patrick Burke committed Oct 7, 2024
2 parents e250ca0 + 9be833c commit fe566ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ if(ACEtk.python)
# If the stubs fail to generate then this command exits gracefully and allows the build to continue.
add_custom_command(
TARGET ACEtk.python POST_BUILD
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${tools_PYTHONPATH}:${ACEtk_PYTHONPATH}:$ENV{PYTHONPATH} ${pybind11stubgen_exe} ACEtk -o ${CMAKE_CURRENT_SOURCE_DIR}/stubs &> ${CMAKE_CURRENT_BINARY_DIR}/pybind11-stubgen.log || echo ""
COMMAND ${CMAKE_COMMAND} -E rename ${stubdir}/__init__.pyi ${stubdir}/ACEtk.pyi
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${tools_PYTHONPATH}:${ACEtk_PYTHONPATH}:$ENV{PYTHONPATH} ${pybind11stubgen_exe} ACEtk -o ${CMAKE_CURRENT_SOURCE_DIR}/stubs &> ${CMAKE_CURRENT_BINARY_DIR}/pybind11-stubgen.log || true
COMMAND ${CMAKE_COMMAND} -E rename ${stubdir}/__init__.pyi ${stubdir}/ACEtk.pyi &> /dev/null || true
COMMAND ${CMAKE_COMMAND} -E copy_directory ${stubdir}/ ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building ACEtk's python stub files via pybind11-stubgen. See pybind11-stubgen.log for details."
VERBATIM
Expand Down

0 comments on commit fe566ba

Please sign in to comment.