]> granicus.if.org Git - python/commitdiff
Allow passing the MSI file name to merge.py.
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 8 Sep 2008 12:02:45 +0000 (12:02 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 8 Sep 2008 12:02:45 +0000 (12:02 +0000)
Misc/NEWS
Tools/msi/merge.py

index 6c22cd825e223b4155c93821a0bd92e8edd73dd6..72361f9b78896d403ad7675048bee125e286abcb 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -125,6 +125,8 @@ Tests
 Build
 -----
 
+- Allow passing the MSI file name to merge.py.
+
 - Issue #3758: Rename the 'check' target to 'patchcheck' so as to not clash 
   with GNU build target guidelines.
 
index ff34b9354b08fffbc5a8e22d536a6ef3539cc7b6..412356765da6c0110208eadf1dfae35cf280762e 100644 (file)
@@ -1,16 +1,19 @@
-import msilib,os,win32com,tempfile\r
+import msilib,os,win32com,tempfile,sys\r
 PCBUILD="PCBuild"\r
 from config import *\r
 \r
 Win64 = "amd64" in PCBUILD\r
 \r
 mod_dir = os.path.join(os.environ["ProgramFiles"], "Common Files", "Merge Modules")\r
+msi = None\r
+if len(sys.argv)==2:\r
+    msi = sys.argv[1]\r
 if Win64:\r
     modules = ["Microsoft_VC90_CRT_x86.msm", "policy_8_0_Microsoft_VC80_CRT_x86_x64.msm"]\r
-    msi = "python-%s.amd64.msi" % full_current_version\r
+    if not msi: msi = "python-%s.amd64.msi" % full_current_version\r
 else:\r
     modules = ["Microsoft_VC90_CRT_x86.msm","policy_8_0_Microsoft_VC80_CRT_x86.msm"]\r
-    msi = "python-%s.msi" % full_current_version\r
+    if not msi: msi = "python-%s.msi" % full_current_version\r
 for i, n in enumerate(modules):\r
     modules[i] = os.path.join(mod_dir, n)\r
 \r