gpython: Implement -O
Let's teach gpython and pymain about -O because buildout calls `python -O` to byte-compile python sources in optimized mode: slapos!862 (comment 121470) When seeing -O, we take the approach to reexecute underlying python with -O, so that e.g. gpython -O file.py becomes executed as python -O gpython file.py This ensures correctness. The same approach could be used to implement support for e.g. -S and other low-level options. An earlier attempt to implement -O without reexecution can be seen at !7 together with list of problems that arise via that way. Original idea to reexecute itself come from @jerome.
Showing
-
mentioned in commit slapos@a9289763
-
mentioned in merge request !30 (closed)
Please register or sign in to comment