]> granicus.if.org Git - python/commitdiff
Merged revisions 84487 via svnmerge from
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 14 Nov 2010 18:17:39 +0000 (18:17 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 14 Nov 2010 18:17:39 +0000 (18:17 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84487 | martin.v.loewis | 2010-09-04 16:38:09 +0200 (Sa, 04 Sep 2010) | 3 lines

  Issue #1303434: Include PDBs in release.
  Patch by James Lee and Daniel Stutzbach.
........

Misc/NEWS
Tools/msi/msi.py

index b45fe76793ed31f7049ca9e524910029a421dc8e..da50fa27979cd80912bb4e987d0add17c9ce6e95 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -15,6 +15,11 @@ Library
 
 - Issue #5111: IPv6 Host in the Header is wrapped inside [ ]. Patch by Chandru.
 
+Build
+-----
+
+- Issue #1303434: Generate ZIP file containing all PDBs.
+
 
 What's New in Python 2.7.1 release candidate 1?
 ===============================================
index d50b1aa3b8ae90e1df3a3e847c8331e5940c4b33..d9882831fc636d9dbeb5b24b37f7de876c58bdd1 100644 (file)
@@ -1,7 +1,7 @@
 # Python MSI Generator
 # (C) 2003 Martin v. Loewis
 # See "FOO" in comments refers to MSDN sections with the title FOO.
-import msilib, schema, sequence, os, glob, time, re, shutil
+import msilib, schema, sequence, os, glob, time, re, shutil, zipfile
 from msilib import Feature, CAB, Directory, Dialog, Binary, add_data
 import uisample
 from win32com.client import constants
@@ -31,6 +31,8 @@ PCBUILD="PCbuild"
 MSVCR = "90"
 # Name of certificate in default store to sign MSI with
 certname = None
+# Make a zip file containing the PDB files for this build?
+pdbzip = True
 
 try:
     from config import *
@@ -1297,6 +1299,16 @@ def add_registry(db):
               ])
     db.Commit()
 
+def build_pdbzip():
+    pdbexclude = ['kill_python.pdb', 'make_buildinfo.pdb',
+                  'make_versioninfo.pdb']
+    path = "python-%s%s-pdb.zip" % (full_current_version, msilib.arch_ext)
+    pdbzip = zipfile.ZipFile(path, 'w')
+    for f in glob.glob1(os.path.join(srcdir, PCBUILD), "*.pdb"):
+        if f not in pdbexclude and not f.endswith('_d.pdb'):
+            pdbzip.write(os.path.join(srcdir, PCBUILD, f), f)
+    pdbzip.close()
+
 db,msiname = build_database()
 try:
     add_features(db)
@@ -1379,3 +1391,6 @@ merge(msiname, "SharedCRT", "TARGETDIR", modules)
 # the certificate subject, e.g. "Python Software Foundation"
 if certname:
     os.system('signtool sign /n "%s" /t http://timestamp.verisign.com/scripts/timestamp.dll %s' % (certname, msiname))
+
+if pdbzip:
+    build_pdbzip()