From 708812085355c92f32e547d1f1d1f29aefbbc27e Mon Sep 17 00:00:00 2001
From: Steve Dower <steve.dower@python.org>
Date: Wed, 16 Mar 2022 00:46:33 +0000
Subject: [PATCH] bpo-46948: Fix launcher installer build failure due to first
 part of fix (GH-31920)

---
 Tools/msi/common.wxs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Tools/msi/common.wxs b/Tools/msi/common.wxs
index d8f3cde99ab..4554e80014a 100644
--- a/Tools/msi/common.wxs
+++ b/Tools/msi/common.wxs
@@ -61,6 +61,7 @@
     </Fragment>
 
     <Fragment>
+        <?ifdef PythonExeComponentGuid ?>
         <!-- Locate TARGETDIR automatically assuming we have executables installed -->
         <Property Id="TARGETDIR">
             <ComponentSearch Id="PythonExe_Directory" Guid="$(var.PythonExeComponentGuid)">
@@ -69,6 +70,7 @@
                 </DirectorySearch>
             </ComponentSearch>
         </Property>
+        <?endif ?>
         <Property Id="DetectTargetDir" Value="1" />
     </Fragment>
     
-- 
GitLab