Skip to content

Commit 70c4218

Browse files
committed
a
Signed-off-by: Vlad Gheorghiu <[email protected]>
1 parent 1c65e65 commit 70c4218

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pyqpp/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ file(MAKE_DIRECTORY "${STUBGEN_OUTPUT_PATH}")
5151
add_custom_command(
5252
TARGET pyqpp
5353
POST_BUILD
54-
COMMAND ${Python3_EXECUTABLE} -m pybind11_stubgen pyqpps --output-dir
55-
${STUBGEN_OUTPUT_PATH} --ignore-all-errors
54+
COMMAND
55+
${CMAKE_COMMAND} -E env
56+
PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}${PATH_SEP}${CMAKE_CURRENT_BINARY_DIR}/Release
57+
${Python3_EXECUTABLE} -m pybind11_stubgen pyqpp --output-dir
58+
${CMAKE_CURRENT_BINARY_DIR}/stubs --ignore-all-errors
5659
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
57-
COMMENT "Generating Python stubs for pyqpp..."
5860
VERBATIM)
59-
6061
# Create an empty "py.typed" file in the build directory
6162
file(TOUCH "${CMAKE_CURRENT_BINARY_DIR}/py.typed")
6263
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/py.typed" DESTINATION pyqpp)

0 commit comments

Comments
 (0)