From edd1544375bd55f79168db315151a48faa548fa0 Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Fri, 30 Sep 2022 14:39:16 +0200 Subject: [PATCH] cmake: make ortools install in venv more robuste (#3260) --- cmake/python.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/python.cmake b/cmake/python.cmake index 9745fc54c5..d91789c2b0 100644 --- a/cmake/python.cmake +++ b/cmake/python.cmake @@ -376,7 +376,8 @@ if(BUILD_TESTING) #COMMAND ${VENV_EXECUTABLE} ${VENV_DIR} # Must NOT call it in a folder containing the setup.py otherwise pip call it # (i.e. "python setup.py bdist") while we want to consume the wheel package - COMMAND ${VENV_Python3_EXECUTABLE} -m pip install --find-links=${CMAKE_CURRENT_BINARY_DIR}/python/dist ${PYTHON_PROJECT} + COMMAND ${VENV_Python3_EXECUTABLE} -m pip install + --find-links=${CMAKE_CURRENT_BINARY_DIR}/python/dist ${PYTHON_PROJECT}==${PROJECT_VERSION} # install modules only required to run examples COMMAND ${VENV_Python3_EXECUTABLE} -m pip install pandas matplotlib pytest BYPRODUCTS ${VENV_DIR}