<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>In continuation of the previous message.</div><div><br></div><div></div><div>If the compilation of *.py files is indeed important, then copying the *.py files into dist and issuing <br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><span style="font-family:monospace,monospace">python -m compileall ./dist.x86_64-pc-linux-gnu</span></div></blockquote><div><br></div><div>is going to be orders of magnitudes faster (a single process that compiles all the files vs creating a new process per *.py file). This is going to be even faster if only a bunch of *.py files need to be compiled.<br></div><div><br></div><div><div>Just for comparison on my laptop (using Python 3):</div><div><br></div><div>- I need ~5 secs to run make on lib/python</div><div>- I need ~8 secs to run make on gui/wxpython</div><div>- while I only need ~1 sec to compile all the *.py files using compileall:<br></div></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><span style="font-family:monospace,monospace">$ find ./dist.x86_64-pc-linux-gnu -name '*.pyc' -delete</span></div><div><span style="font-family:monospace,monospace">$ python -m compileall ./dist.x86_64-pc-linux-gnu</span></div><div><span style="font-family:monospace,monospace">[...]</span><span style="font-family:monospace,monospace"></span> <br></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><span style="font-family:monospace,monospace">python -m compileall ./dist.x86_64-pc-linux-gnu  1.10s user 0.11s system 99% cpu 1.214 total</span></div></blockquote><div><br></div><div>Re-running <span style="font-family:monospace,monospace">compileall</span> is nearly instantaneous:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:monospace,monospace">python -mcompileall ./  0.07s user 0.03s system 99% cpu 0.101 total</span><br></blockquote><br></div><div>So, unless someone can clarify why the compilation step is necessary, I would suggest removing it. <br></div><div>If it is indeed needed, then I would suggest modifying the Makefile rules to use <span style="font-family:monospace,monospace">compileall</span> instead of plain <span style="font-family:monospace,monospace">compile</span></div><div><br></div><div>with kind regards,</div><div>Panos<br></div><div><br></div></div></div></div></div>