diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:46:30 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:46:33 +0900 |
commit | dca4e6423c560689ee831785473ad3ab48e7548a (patch) | |
tree | 048ddb6edb0826be8ff180c027d45acb6dac67db /py-compile | |
parent | 392945d666d2cfb31a844826a72b1eb65a52546f (diff) | |
download | pygobject2-dca4e6423c560689ee831785473ad3ab48e7548a.tar.gz pygobject2-dca4e6423c560689ee831785473ad3ab48e7548a.tar.bz2 pygobject2-dca4e6423c560689ee831785473ad3ab48e7548a.zip |
Imported Upstream version 3.3.1
Change-Id: I7e59d7cf82217b545ec40115122a83ebf79763cb
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'py-compile')
-rwxr-xr-x | py-compile | 23 |
1 files changed, 7 insertions, 16 deletions
@@ -3,7 +3,8 @@ scriptversion=2011-06-08.12; # UTC -# Copyright (C) 2000-2014 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009, 2011 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 @@ -36,7 +37,7 @@ me=py-compile usage_error () { echo "$me: $*" >&2 - echo "Try '$me --help' for more information." >&2 + echo "Try \`$me --help' for more information." >&2 exit 1 } @@ -116,7 +117,7 @@ else fi $PYTHON -c " -import sys, os, py_compile, imp +import sys, os, py_compile files = '''$files''' @@ -129,19 +130,12 @@ for file in files.split(): continue sys.stdout.write(file) sys.stdout.flush() - if hasattr(imp, 'get_tag'): - py_compile.compile(filepath, imp.cache_from_source(filepath), path) - else: - py_compile.compile(filepath, filepath + 'c', path) + 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, imp - -# pypy does not use .pyo optimization -if hasattr(sys, 'pypy_translation_info'): - sys.exit(0) +import sys, os, py_compile files = '''$files''' sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n') @@ -153,10 +147,7 @@ for file in files.split(): continue sys.stdout.write(file) sys.stdout.flush() - if hasattr(imp, 'get_tag'): - py_compile.compile(filepath, imp.cache_from_source(filepath, False), path) - else: - py_compile.compile(filepath, filepath + 'o', path) + py_compile.compile(filepath, filepath + 'o', path) sys.stdout.write('\n')" 2>/dev/null || : # Local Variables: |