From c4c21a60f45ad001794b2455176d64098d41c346 Mon Sep 17 00:00:00 2001 From: dingye18 Date: Tue, 27 Aug 2024 17:17:41 +0800 Subject: [PATCH] Remove setup.py install in PythonInstall process. --- python/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index aae64b0..dc13b93 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -31,9 +31,8 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/OpenMMDeepmdPlugin DESTINATION ${CMAKE_CUR configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py ${CMAKE_CURRENT_BINARY_DIR}/setup.py) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/OpenMMDeepmdPlugin/__init__.py ${CMAKE_CURRENT_BINARY_DIR}/OpenMMDeepmdPlugin/__init__.py) add_custom_command(TARGET PythonInstall - COMMAND "${PYTHON_EXECUTABLE}" setup.py build - COMMAND mv ${CMAKE_CURRENT_BINARY_DIR}/OpenMMDeepmdPlugin.py ${CMAKE_CURRENT_BINARY_DIR}/OpenMMDeepmdPlugin - COMMAND "${PYTHON_EXECUTABLE}" setup.py install + COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/OpenMMDeepmdPlugin.py ${CMAKE_CURRENT_BINARY_DIR}/OpenMMDeepmdPlugin + COMMAND "${PYTHON_EXECUTABLE}" -m pip install . WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )