From 0dde82a08af0799ba63419234c21c23e366afec2 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 4 Sep 2024 13:33:02 +0200 Subject: [PATCH] Make cpython compilation work on powershell. Powershell uses ; as a command-separator, so the way the msbuild targets joins the list with those ';' would make it interpret the next target as the next command instead. done as part of CURA-11622 --- recipes/cpython/all/conanfile.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/cpython/all/conanfile.py b/recipes/cpython/all/conanfile.py index d2f5f24..2598a24 100644 --- a/recipes/cpython/all/conanfile.py +++ b/recipes/cpython/all/conanfile.py @@ -587,8 +587,10 @@ def _msvc_build(self): sln = os.path.join(self.source_folder, "PCbuild", "pcbuild.sln") # FIXME: Solution files do not pick up the toolset automatically. - cmd = msbuild.command(sln, targets=projects) - self.run(f"{cmd} /p:PlatformToolset={msvs_toolset(self)}") + for project in projects: + # To make this work in Powershell too (which uses ';' as command seperation), do each project separately. + cmd = msbuild.command(sln, targets=[project]) + self.run(f"{cmd} /p:PlatformToolset={msvs_toolset(self)}") def build(self): self._patch_sources()