@@ -382,6 +382,7 @@ def add_ui(db):
382382 ])
383383
384384 compileargs = r'-Wi "[TARGETDIR]Lib\compileall.py" -f -x bad_coding|badsyntax|site-packages|py3_ "[TARGETDIR]Lib"'
385+ lib2to3args = r'-c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"'
385386 # See "CustomAction Table"
386387 add_data (db , "CustomAction" , [
387388 # msidbCustomActionTypeFirstSequence + msidbCustomActionTypeTextData + msidbCustomActionTypeProperty
@@ -395,6 +396,7 @@ def add_ui(db):
395396 # See "Custom Action Type 18"
396397 ("CompilePyc" , 18 , "python.exe" , compileargs ),
397398 ("CompilePyo" , 18 , "python.exe" , "-O " + compileargs ),
399+ ("CompileGrammar" , 18 , "python.exe" , lib2to3args ),
398400 ])
399401
400402 # UI Sequences, see "InstallUISequence Table", "Using a Sequence Table"
@@ -424,12 +426,14 @@ def add_ui(db):
424426 ("UpdateEditIDLE" , None , 1050 ),
425427 ("CompilePyc" , "COMPILEALL" , 6800 ),
426428 ("CompilePyo" , "COMPILEALL" , 6801 ),
429+ ("CompileGrammar" , "COMPILEALL" , 6802 ),
427430 ])
428431 add_data (db , "AdminExecuteSequence" ,
429432 [("InitialTargetDir" , 'TARGETDIR=""' , 750 ),
430433 ("SetDLLDirToTarget" , 'DLLDIR=""' , 751 ),
431434 ("CompilePyc" , "COMPILEALL" , 6800 ),
432435 ("CompilePyo" , "COMPILEALL" , 6801 ),
436+ ("CompileGrammar" , "COMPILEALL" , 6802 ),
433437 ])
434438
435439 #####################################################################
@@ -999,6 +1003,8 @@ def add_files(db):
9991003 if dir == "setuptools" :
10001004 lib .add_file ("cli.exe" )
10011005 lib .add_file ("gui.exe" )
1006+ if dir == "lib2to3" :
1007+ lib .removefile ("pickle" , "*.pickle" )
10021008 if dir == "data" and parent .physical == "test" and parent .basedir .physical == "email" :
10031009 # This should contain all non-.svn files listed in subversion
10041010 for f in os .listdir (lib .absolute ):
0 commit comments