kumquat-buildroot/support
Yegor Yefremov 549bbba67f python/python3: globalize *.pyc files compilation
Currently, each python package (be it the python interpreter package
itself or external python modules) is responsible for compiling its
.py into .pyc files. Unfortunately, this is not ideal as some packages
only install .py files without compiling them into .pyc files. In this
case, if the Buildroot configuration specifies to keep only the .pyc
files, the .py files are removed and lost.

To address this, this commit changes the logic by making the
compilation of .pyc files a global operation: the python interpreter
packages register a target finalize hook that is in charge of
compiling all installed .py files.

The *.pyc generation on a per package basis is disabled in the
python-package infrastructure by passing the "--no-compile" option to
setup.py.

The *.pyc generation for the Python interpreter internal modules is
disabled through --disable-pyc-build configure option.

A small helper script is used to perform the compilation, the purpose
of this script is to abort the compilation process if one of the .py
file cannot be compiled. It has been provided by Samuel Martin and
integrated into this commit.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Cc: Samuel Martin <s.martin49@gmail.com>
[Thomas:
 - rework for python 3.5
 - integrate Samuel proposal that allows to detect compilation
   failures.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-26 22:07:35 +02:00
..
dependencies dependencies.sh: improve the missing perl modules detection 2015-10-15 22:51:50 +02:00
download support/download: really, really make git archives reproducible 2016-02-27 23:13:55 +01:00
dummy-external core: allow external Config.in/makefile code to be integrated 2013-12-08 22:39:42 +01:00
gnuconfig Update config.guess and config.sub scripts to latest versions. 2013-10-27 15:29:38 +01:00
kconfig merge_config.sh: create temporary files in /tmp 2016-01-31 09:09:52 +01:00
legal-info core/legal-info: update the legal-info report header 2016-02-01 22:04:39 +01:00
libtool support/libtool: add patch for newer versions 2014-12-21 13:21:56 +01:00
misc Update for 2016.02 2016-03-01 21:47:30 +01:00
scripts python/python3: globalize *.pyc files compilation 2016-05-26 22:07:35 +02:00