From 64f5a8f26d64f5d7e46c88940f787135ff97a63b Mon Sep 17 00:00:00 2001 From: Sindre Nistad Date: Tue, 23 Jan 2024 15:07:21 +0100 Subject: [PATCH] fix: Copy `pyproject.toml` before it is used --- cmake/python-venv.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/python-venv.cmake b/cmake/python-venv.cmake index d3222db9f..930b850bd 100644 --- a/cmake/python-venv.cmake +++ b/cmake/python-venv.cmake @@ -15,6 +15,7 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter) if (NOT VENV_INITIALIZED) message(STATUS "Installing necessary dependencies in ${CMAKE_BINARY_DIR}/venv") + file(COPY_FILE ${CMAKE_SOURCE_DIR}/pyproject.toml ${CMAKE_BINARY_DIR}/pyproject.toml) # Ensure pip ins up do date execute_process( COMMAND ${Python3_EXECUTABLE} -m pip install --upgrade pip @@ -52,7 +53,6 @@ except ImportError: COMMAND_ERROR_IS_FATAL ANY ) execute_process( - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/pyproject.toml pyproject.toml COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/bin/install-build-requirements.py COMMAND_ERROR_IS_FATAL ANY )