Document windows 7 permissions workaround master tabakrolletjie-v1.0.0
authorNeil <neil@dip.sun.ac.za>
Sun, 11 Sep 2016 14:29:46 +0000 (16:29 +0200)
committerNeil <neil@dip.sun.ac.za>
Sun, 11 Sep 2016 14:29:46 +0000 (16:29 +0200)
packaging/README.txt [new file with mode: 0644]
packaging/win7_c_parser.patch [new file with mode: 0644]

diff --git a/packaging/README.txt b/packaging/README.txt
new file mode 100644 (file)
index 0000000..7c34de4
--- /dev/null
@@ -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 (file)
index 0000000..0a8e917
--- /dev/null
@@ -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=''):