# 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
PCBUILD="PCbuild"
# msvcrt version
MSVCR = "90"
+# Make a zip file containing the PDB files for this build?
+pdbzip = True
try:
from config import *
# Add tools
tools.set_current()
tooldir = PyDirectory(db, cab, root, "Tools", "Tools", "TOOLS|Tools")
- for f in ['i18n', 'pynche', 'Scripts', 'versioncheck', 'webchecker']:
+ for f in ['i18n', 'pynche', 'Scripts', 'webchecker']:
lib = PyDirectory(db, cab, tooldir, f, f, "%s|%s" % (tooldir.make_short(f), f))
lib.glob("*.py")
lib.glob("*.pyw", exclude=['pydocgui.pyw'])
])
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 = build_database()
try:
add_features(db)
db.Commit()
finally:
del db
+
+if pdbzip:
+ build_pdbzip()