python-2.7-007-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-2.7.2/Makefile.pre.in
  13. ===================================================================
  14. --- Python-2.7.2.orig/Makefile.pre.in
  15. +++ Python-2.7.2/Makefile.pre.in
  16. @@ -934,20 +934,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 -tt -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 -t $(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 -t -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) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
  35. # Create the PLATDIR source directory, if one wasn't distributed..