aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/automake/files/0001-py-compile-compile-only-optimized-byte-code.patch
blob: 1eca0a8b64209b2005f8bf7de67e5e1ef6aa02bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
upstream: OE-only

From 4f84894b3df47ce797100f25d2d79f08bb27cd0d Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <obi@opendreambox.org>
Date: Thu, 14 Oct 2010 12:25:50 +0200
Subject: [PATCH] py-compile: compile only optimized byte code

---
 lib/py-compile |   17 -----------------
 1 files changed, 0 insertions(+), 17 deletions(-)

diff --git a/lib/py-compile b/lib/py-compile
index 3f9d05b..101c814 100755
--- a/lib/py-compile
+++ b/lib/py-compile
@@ -101,23 +101,6 @@ else
     filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
 fi
 
-$PYTHON -c "
-import sys, os, py_compile
-
-files = '''$files'''
-
-sys.stdout.write('Byte-compiling python modules...\n')
-for file in files.split():
-    $pathtrans
-    $filetrans
-    if not os.path.exists(filepath) or not (len(filepath) >= 3
-                                            and filepath[-3:] == '.py'):
-	    continue
-    sys.stdout.write(file)
-    sys.stdout.flush()
-    py_compile.compile(filepath, filepath + 'c', path)
-sys.stdout.write('\n')" || exit $?
-
 # this will fail for python < 1.5, but that doesn't matter ...
 $PYTHON -O -c "
 import sys, os, py_compile
-- 
1.7.0.4