Skip to content

Commit

Permalink
ensure to use pip matching the python environment (#3524)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminum authored Jun 1, 2021
1 parent ad362ba commit 402babb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cpp/pybind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ add_custom_target(pip-package
add_custom_target(install-pip-package
COMMAND ${CMAKE_COMMAND}
-DPYTHON_PACKAGE_DST_DIR=${PYTHON_PACKAGE_DST_DIR}
-DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
-P ${CMAKE_CURRENT_SOURCE_DIR}/make_install_pip_package.cmake
DEPENDS pip-package
)
Expand Down
2 changes: 1 addition & 1 deletion cpp/pybind/make_install_pip_package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Note: Since `make python-package` clears PYTHON_COMPILED_MODULE_DIR every time,
# it is guaranteed that there is only one wheel in ${PYTHON_PACKAGE_DST_DIR}/pip_package/*.whl
file(GLOB WHEEL_FILE "${PYTHON_PACKAGE_DST_DIR}/pip_package/*.whl")
execute_process(COMMAND pip install ${WHEEL_FILE} -U)
execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip install ${WHEEL_FILE} -U)

0 comments on commit 402babb

Please sign in to comment.