summaryrefslogtreecommitdiff
path: root/lzo/autoconf/py-compile
diff options
context:
space:
mode:
Diffstat (limited to 'lzo/autoconf/py-compile')
-rwxr-xr-xlzo/autoconf/py-compile34
1 files changed, 18 insertions, 16 deletions
diff --git a/lzo/autoconf/py-compile b/lzo/autoconf/py-compile
index 865cda82..3f9d05b6 100755
--- a/lzo/autoconf/py-compile
+++ b/lzo/autoconf/py-compile
@@ -1,13 +1,14 @@
#!/bin/sh
# py-compile - Compile a Python program
-scriptversion=2005-05-14.22
+scriptversion=2009-04-28.21; # UTC
-# Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software
+# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
+# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
@@ -101,38 +102,38 @@ else
fi
$PYTHON -c "
-import sys, os, string, py_compile
+import sys, os, py_compile
files = '''$files'''
-print 'Byte-compiling python modules...'
-for file in string.split(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
- print file,
+ continue
+ sys.stdout.write(file)
sys.stdout.flush()
py_compile.compile(filepath, filepath + 'c', path)
-print" || exit $?
+sys.stdout.write('\n')" || exit $?
# this will fail for python < 1.5, but that doesn't matter ...
$PYTHON -O -c "
-import sys, os, string, py_compile
+import sys, os, py_compile
files = '''$files'''
-print 'Byte-compiling python modules (optimized versions) ...'
-for file in string.split(files):
+sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
+for file in files.split():
$pathtrans
$filetrans
if not os.path.exists(filepath) or not (len(filepath) >= 3
and filepath[-3:] == '.py'):
- continue
- print file,
+ continue
+ sys.stdout.write(file)
sys.stdout.flush()
py_compile.compile(filepath, filepath + 'o', path)
-print" 2>/dev/null || :
+sys.stdout.write('\n')" 2>/dev/null || :
# Local Variables:
# mode: shell-script
@@ -140,5 +141,6 @@ print" 2>/dev/null || :
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End: