python3-005-do-not-generate-pyo-files.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Do not generate .pyo files
  2. By default, the Python installation byte-compiles all modules in two
  3. forms: the normal bytecode (.pyc) and an optimized bytecode (.pyo).
  4. According to
  5. http://www.network-theory.co.uk/docs/pytut/CompiledPythonfiles.html,
  6. the optimization do not do anything useful, and generating both the
  7. "non-optimized" and "optimized" bytecode variants takes time.
  8. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  9. ---
  10. Makefile.pre.in | 9 ---------
  11. 1 file changed, 9 deletions(-)
  12. Index: Python-3.3.0/Makefile.pre.in
  13. ===================================================================
  14. --- Python-3.3.0.orig/Makefile.pre.in
  15. +++ Python-3.3.0/Makefile.pre.in
  16. @@ -1082,20 +1082,11 @@
  17. -d $(LIBDEST) -f \
  18. -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
  19. $(DESTDIR)$(LIBDEST)
  20. - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  21. - $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
  22. - -d $(LIBDEST) -f \
  23. - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
  24. - $(DESTDIR)$(LIBDEST)
  25. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  26. $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
  27. -d $(LIBDEST)/site-packages -f \
  28. -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  29. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  30. - $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
  31. - -d $(LIBDEST)/site-packages -f \
  32. - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  33. - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  34. $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
  35. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  36. $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt