From 708daff936c369c39bddb2e2eda517712383c1d3 Mon Sep 17 00:00:00 2001 From: Jacob Viau Date: Tue, 9 Apr 2024 20:28:06 -0700 Subject: [PATCH 1/3] Remove custom targets, use 'None' item group --- ...osoft.Azure.Functions.PythonWorker.targets | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/pack/Microsoft.Azure.Functions.PythonWorker.targets b/pack/Microsoft.Azure.Functions.PythonWorker.targets index ba674972d..1a7715b26 100644 --- a/pack/Microsoft.Azure.Functions.PythonWorker.targets +++ b/pack/Microsoft.Azure.Functions.PythonWorker.targets @@ -1,25 +1,15 @@ - - - - - - - + + <_PythonWorkerToolsDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)../tools')) + - - - - + + + - - - - - - - From f49344ca8ff799e819cc2a3814934a09510ad42b Mon Sep 17 00:00:00 2001 From: Jacob Viau Date: Tue, 16 Apr 2024 13:39:48 -0700 Subject: [PATCH 2/3] Add runtime specific copy logic --- ...osoft.Azure.Functions.PythonWorker.targets | 40 ++++++++++++++++--- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/pack/Microsoft.Azure.Functions.PythonWorker.targets b/pack/Microsoft.Azure.Functions.PythonWorker.targets index 1a7715b26..e902ef2e8 100644 --- a/pack/Microsoft.Azure.Functions.PythonWorker.targets +++ b/pack/Microsoft.Azure.Functions.PythonWorker.targets @@ -4,12 +4,40 @@ <_PythonWorkerToolsDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)../tools')) - - + + <_PythonSupportedRuntime Include="win-x86" WorkerPath="WINDOWS/X86" /> + <_PythonSupportedRuntime Include="win-x64" WorkerPath="WINDOWS/X64" /> + <_PythonSupportedRuntime Include="linux-x64" WorkerPath="LINUX/X64" /> + <_PythonSupportedRuntime Include="osx-x64" WorkerPath="OSX/X64" /> + <_PythonSupportedRuntime Include="osx-arm64" WorkerPath="OSX/Arm64" /> + + + + + + + + + + <_PythonWorkerFiles Include="$(_PythonWorkerToolsDir)/**" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" /> + + + + + + + <_PythonWorkersRuntimeFolder>@(_PythonSupportedRuntime->WithMetadataValue('Identity', '$(RuntimeIdentifier)')->Metadata('WorkerPath')) + + + + <_PythonWorkerFiles Include="$(_PythonWorkerToolsDir)/*" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" /> + <_PythonWorkerFiles Include="$(_PythonWorkerToolsDir)/**/$(_PythonWorkersRuntimeFolder)/**" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" /> + + + + + + From d3b184211ca74196c7f9d002cf8c7faade5873fa Mon Sep 17 00:00:00 2001 From: Jacob Viau Date: Tue, 16 Apr 2024 13:42:42 -0700 Subject: [PATCH 3/3] Add underscore to target name --- pack/Microsoft.Azure.Functions.PythonWorker.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pack/Microsoft.Azure.Functions.PythonWorker.targets b/pack/Microsoft.Azure.Functions.PythonWorker.targets index e902ef2e8..887dc8d52 100644 --- a/pack/Microsoft.Azure.Functions.PythonWorker.targets +++ b/pack/Microsoft.Azure.Functions.PythonWorker.targets @@ -12,7 +12,7 @@ <_PythonSupportedRuntime Include="osx-arm64" WorkerPath="OSX/Arm64" /> - +