[Python-checkins] r63638 - in python/trunk/Tools/msi: msi.py msilib.py
martin.v.loewis
python-checkins at python.org
Sun May 25 18:37:35 CEST 2008
Author: martin.v.loewis
Date: Sun May 25 18:37:34 2008
New Revision: 63638
Log:
Create grammar pickle files on installation; remove them on uninstallation.
Modified:
python/trunk/Tools/msi/msi.py
python/trunk/Tools/msi/msilib.py
Modified: python/trunk/Tools/msi/msi.py
==============================================================================
--- python/trunk/Tools/msi/msi.py (original)
+++ python/trunk/Tools/msi/msi.py Sun May 25 18:37:34 2008
@@ -382,6 +382,7 @@
])
compileargs = r'-Wi "[TARGETDIR]Lib\compileall.py" -f -x bad_coding|badsyntax|site-packages|py3_ "[TARGETDIR]Lib"'
+ lib2to3args = r'-c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"'
# See "CustomAction Table"
add_data(db, "CustomAction", [
# msidbCustomActionTypeFirstSequence + msidbCustomActionTypeTextData + msidbCustomActionTypeProperty
@@ -395,6 +396,7 @@
# See "Custom Action Type 18"
("CompilePyc", 18, "python.exe", compileargs),
("CompilePyo", 18, "python.exe", "-O "+compileargs),
+ ("CompileGrammar", 18, "python.exe", lib2to3args),
])
# UI Sequences, see "InstallUISequence Table", "Using a Sequence Table"
@@ -424,12 +426,14 @@
("UpdateEditIDLE", None, 1050),
("CompilePyc", "COMPILEALL", 6800),
("CompilePyo", "COMPILEALL", 6801),
+ ("CompileGrammar", "COMPILEALL", 6802),
])
add_data(db, "AdminExecuteSequence",
[("InitialTargetDir", 'TARGETDIR=""', 750),
("SetDLLDirToTarget", 'DLLDIR=""', 751),
("CompilePyc", "COMPILEALL", 6800),
("CompilePyo", "COMPILEALL", 6801),
+ ("CompileGrammar", "COMPILEALL", 6802),
])
#####################################################################
@@ -999,6 +1003,8 @@
if dir=="setuptools":
lib.add_file("cli.exe")
lib.add_file("gui.exe")
+ if dir=="lib2to3":
+ lib.removefile("pickle", "*.pickle")
if dir=="data" and parent.physical=="test" and parent.basedir.physical=="email":
# This should contain all non-.svn files listed in subversion
for f in os.listdir(lib.absolute):
Modified: python/trunk/Tools/msi/msilib.py
==============================================================================
--- python/trunk/Tools/msi/msilib.py (original)
+++ python/trunk/Tools/msi/msilib.py Sun May 25 18:37:34 2008
@@ -571,6 +571,11 @@
[(self.component+"c", self.component, "*.pyc", self.logical, 2),
(self.component+"o", self.component, "*.pyo", self.logical, 2)])
+ def removefile(self, key, pattern):
+ "Add a RemoveFile entry"
+ add_data(self.db, "RemoveFile", [(self.component+key, self.component, pattern, self.logical, 2)])
+
+
class Feature:
def __init__(self, db, id, title, desc, display, level = 1,
parent=None, directory = None, attributes=0):
More information about the Python-checkins
mailing list