summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/automake/automake/py-compile-compile-only-optimized-byte-code.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/automake/automake/py-compile-compile-only-optimized-byte-code.patch')
-rw-r--r--meta/recipes-devtools/automake/automake/py-compile-compile-only-optimized-byte-code.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-devtools/automake/automake/py-compile-compile-only-optimized-byte-code.patch b/meta/recipes-devtools/automake/automake/py-compile-compile-only-optimized-byte-code.patch
new file mode 100644
index 0000000000..f09bfbca5d
--- /dev/null
+++ b/meta/recipes-devtools/automake/automake/py-compile-compile-only-optimized-byte-code.patch
@@ -0,0 +1,42 @@
1Upstream-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---
9 lib/py-compile | 17 -----------------
10 1 files changed, 0 insertions(+), 17 deletions(-)
11
12diff --git a/lib/py-compile b/lib/py-compile
13index 3f9d05b..101c814 100755
14--- a/lib/py-compile
15+++ b/lib/py-compile
16@@ -101,23 +101,6 @@ else
17 filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
18 fi
19
20-$PYTHON -c "
21-import sys, os, py_compile
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- py_compile.compile(filepath, filepath + 'c', path)
35-sys.stdout.write('\n')" || exit $?
36-
37 # this will fail for python < 1.5, but that doesn't matter ...
38 $PYTHON -O -c "
39 import sys, os, py_compile
40--
411.7.0.4
42