From 3f2ab3f7cc1bf1646f2acfcace9b9cf546cc3a5d Mon Sep 17 00:00:00 2001 From: Dominic Sacré Date: Tue, 25 Oct 2016 19:20:17 +0200 Subject: python3: Build and package precompiled modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the patch that was applied in the python3 and python3-native recipes to skip compilation of python modules. Modify generate-manifest-3.5.py to match '__pycache__' directories in FILES_*. This is necessary because Python3 puts .pyc files in '__pycache__' subdirectories one level below the corresponding .py files, whereas in Python2 they used to be right next to the sources. This change significantly reduces the startup overhead of Python3 scripts. For example, on a Cortex-A9, "python3 -c pass" took 0.40s before, and 0.19s after. (From OE-Core rev: bb4d689769703177dbb0df0935e15016b879f42b) Signed-off-by: Dominic Sacré Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- .../python3/020-dont-compile-python-files.patch | 48 ---------------------- 1 file changed, 48 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch (limited to 'meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch') diff --git a/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch b/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch deleted file mode 100644 index 819ba69eda..0000000000 --- a/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch +++ /dev/null @@ -1,48 +0,0 @@ -Dont cross compile site packages - --Khem - -Upstream-Status: Inappropriate[Embedded-Specific] - ---- - Makefile.pre.in | 16 ---------------- - 1 file changed, 16 deletions(-) - -Index: Python-3.5.0/Makefile.pre.in -=================================================================== ---- Python-3.5.0.orig/Makefile.pre.in -+++ Python-3.5.0/Makefile.pre.in -@@ -1262,33 +1262,6 @@ libinstall: build_all $(srcdir)/Lib/$(PL - $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ - $(DESTDIR)$(LIBDEST)/distutils/tests ; \ - fi -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST) -f \ -- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ -- $(DESTDIR)$(LIBDEST) -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST) -f \ -- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ -- $(DESTDIR)$(LIBDEST) -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST) -f \ -- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ -- $(DESTDIR)$(LIBDEST) -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST)/site-packages -f \ -- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST)/site-packages -f \ -- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST)/site-packages -f \ -- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- cgit v1.2.3-54-g00ecf