python: remove *.pyo files
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 1 May 2016 20:15:14 +0000 (22:15 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 17 May 2016 20:47:33 +0000 (22:47 +0200)
commit59972daa39fe90de7c353eaa79834571efb4cd08
tree4847a5c38ef0a835aeb9a001e0d180b54808d1d4
parentf76543601ff21af23e2828fcb9b3262378120d78
python: remove *.pyo files

Even though we disable the build of .pyo files in the interpreter,
nothing prevents other packages to install them. Since we only want to
keep either .py or .pyc or both, let's add a target finalize hooks
that removes all .pyo files.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Thomas: add --no-run-if-empty option to xargs, as suggested by Samuel.]
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
package/python/python.mk