blob: f8334a721289c654d694488aa0aaf7a6d1f10ca8 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001Upstream-Status: Inappropriate [embedded specific]
2
3* OE-Core's python creates the same binary output
4 for both pyc and pyo, so disable the creation of
5 pyc files by automake.
6
7Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
8
9Updated for automake-1.12.6
10
11Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
12
13diff -Nurd automake-1.12.6/lib/py-compile automake-1.12.6/lib/py-compile
14--- automake-1.12.6/lib/py-compile 2012-12-13 21:57:31.000000000 +0200
15+++ automake-1.12.6/lib/py-compile 2012-12-27 19:34:01.426015140 +0200
16@@ -115,26 +115,6 @@
17 filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
18 fi
19
20-$PYTHON -c "
21-import sys, os, py_compile, imp
22-
23-files = '''$files'''
24-
25-sys.stdout.write('Byte-compiling python modules...\n')
26-for file in files.split():
27- $pathtrans
28- $filetrans
29- if not os.path.exists(filepath) or not (len(filepath) >= 3
30- and filepath[-3:] == '.py'):
31- continue
32- sys.stdout.write(file)
33- sys.stdout.flush()
34- if hasattr(imp, 'get_tag'):
35- py_compile.compile(filepath, imp.cache_from_source(filepath), path)
36- else:
37- py_compile.compile(filepath, filepath + 'c', path)
38-sys.stdout.write('\n')" || exit $?
39-
40 # this will fail for python < 1.5, but that doesn't matter ...
41 $PYTHON -O -c "
42 import sys, os, py_compile, imp