From ff816a7a672836c685ca15449a8300bdd21cf621 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 11 Sep 2016 16:29:46 +0200 Subject: [PATCH] Document windows 7 permissions workaround --- packaging/README.txt | 8 ++++++++ packaging/win7_c_parser.patch | 14 ++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 packaging/README.txt create mode 100644 packaging/win7_c_parser.patch diff --git a/packaging/README.txt b/packaging/README.txt new file mode 100644 index 0000000..7c34de4 --- /dev/null +++ b/packaging/README.txt @@ -0,0 +1,8 @@ +Later versions of windows don't allow write access to Program Files by default. + +This doesn't play nicely with pycparser's desire to write lextab and yacctab files. +To work around this problem, we disable that by applying the win7_c_parser.patch +manually to C:\Python27\Lib\site-packages\pycparser\c_parser.py before running +py2exe. + +Automating this is left as an exercise for some other pyweek. diff --git a/packaging/win7_c_parser.patch b/packaging/win7_c_parser.patch new file mode 100644 index 0000000..0a8e917 --- /dev/null +++ b/packaging/win7_c_parser.patch @@ -0,0 +1,14 @@ +--- c_parser.py 2016-09-11 16:26:21.515212419 +0200 ++++ c_parser.py.new 2016-09-11 16:26:05.807212016 +0200 +@@ -19,9 +19,9 @@ + class CParser(PLYParser): + def __init__( + self, +- lex_optimize=True, ++ lex_optimize=False, + lextab='pycparser.lextab', +- yacc_optimize=True, ++ yacc_optimize=False, + yacctab='pycparser.yacctab', + yacc_debug=False, + taboutputdir=''): -- 2.34.1