From bc0b5eebe2d9d36801b36037100d8d3f971bbbbb Mon Sep 17 00:00:00 2001 From: Sarath chandra Bussa Date: Wed, 28 Jan 2026 17:59:45 +0530 Subject: [PATCH] changes to copy requirements.txt file --- .../Python/PythonBashBuildSnippet.sh.tpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/BuildScriptGenerator/Python/PythonBashBuildSnippet.sh.tpl b/src/BuildScriptGenerator/Python/PythonBashBuildSnippet.sh.tpl index f88cced09d..efb6a2f847 100644 --- a/src/BuildScriptGenerator/Python/PythonBashBuildSnippet.sh.tpl +++ b/src/BuildScriptGenerator/Python/PythonBashBuildSnippet.sh.tpl @@ -565,6 +565,18 @@ else rm "$COMMAND_MANIFEST_FILE" fi +# Copy requirements.txt to the destination directory if it exists +if [ "$SOURCE_DIR" != "$DESTINATION_DIR" ] +then + if [ -e "$SOURCE_DIR/$REQUIREMENTS_TXT_FILE" ] + then + echo + echo "Copying '$REQUIREMENTS_TXT_FILE' to destination directory..." + cp "$SOURCE_DIR/$REQUIREMENTS_TXT_FILE" "$DESTINATION_DIR/$REQUIREMENTS_TXT_FILE" + echo "Done copying requirements.txt to destination directory." + fi +fi + {{ if VirtualEnvironmentName | IsNotBlank }} {{ if CompressVirtualEnvCommand | IsNotBlank }} if [ "$SOURCE_DIR" != "$DESTINATION_DIR" ]