summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2010-09-04 14:38:09 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2010-09-04 14:38:09 (GMT)
commita5e31091540a0c63ea1a4c9cafad5801480c33b6 (patch)
tree1ef29d39824fdf95eef1a18d9828b96e9fa00222 /Tools
parentcc645b9a59ce56aaa9b411c335c819ce31e26e85 (diff)
downloadcpython-a5e31091540a0c63ea1a4c9cafad5801480c33b6.zip
cpython-a5e31091540a0c63ea1a4c9cafad5801480c33b6.tar.gz
cpython-a5e31091540a0c63ea1a4c9cafad5801480c33b6.tar.bz2
Issue #1303434: Include PDBs in release.
Patch by James Lee and Daniel Stutzbach.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/msi/msi.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py
index a9bbc1d..31869c7 100644
--- a/Tools/msi/msi.py
+++ b/Tools/msi/msi.py
@@ -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 *
@@ -1316,6 +1318,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)
@@ -1398,3 +1410,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()