Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 448896
Collapse All | Expand All

(-)/usr/share/automake-1.11/py-compile (-7 / +16 lines)
Lines 3-10 Link Here
3
3
4
scriptversion=2011-06-08.12; # UTC
4
scriptversion=2011-06-08.12; # UTC
5
5
6
# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009, 2011 Free
6
# Copyright (C) 2000-2012 Free Software Foundation, Inc.
7
# Software Foundation, Inc.
8
7
9
# This program is free software; you can redistribute it and/or modify
8
# This program is free software; you can redistribute it and/or modify
10
# it under the terms of the GNU General Public License as published by
9
# it under the terms of the GNU General Public License as published by
Lines 37-43 Link Here
37
usage_error ()
36
usage_error ()
38
{
37
{
39
  echo "$me: $*" >&2
38
  echo "$me: $*" >&2
40
  echo "Try \`$me --help' for more information." >&2
39
  echo "Try '$me --help' for more information." >&2
41
  exit 1
40
  exit 1
42
}
41
}
43
42
Lines 117-123 Link Here
117
fi
116
fi
118
117
119
$PYTHON -c "
118
$PYTHON -c "
120
import sys, os, py_compile
119
import sys, os, py_compile, imp
121
120
122
files = '''$files'''
121
files = '''$files'''
123
122
Lines 130-141 Link Here
130
	    continue
129
	    continue
131
    sys.stdout.write(file)
130
    sys.stdout.write(file)
132
    sys.stdout.flush()
131
    sys.stdout.flush()
133
    py_compile.compile(filepath, filepath + 'c', path)
132
    if hasattr(imp, 'get_tag'):
133
        py_compile.compile(filepath, imp.cache_from_source(filepath), path)
134
    else:
135
        py_compile.compile(filepath, filepath + 'c', path)
134
sys.stdout.write('\n')" || exit $?
136
sys.stdout.write('\n')" || exit $?
135
137
136
# this will fail for python < 1.5, but that doesn't matter ...
138
# this will fail for python < 1.5, but that doesn't matter ...
137
$PYTHON -O -c "
139
$PYTHON -O -c "
138
import sys, os, py_compile
140
import sys, os, py_compile, imp
141
142
# pypy does not use .pyo optimization
143
if hasattr(sys, 'pypy_translation_info'):
144
    sys.exit(0)
139
145
140
files = '''$files'''
146
files = '''$files'''
141
sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
147
sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
Lines 147-153 Link Here
147
	    continue
153
	    continue
148
    sys.stdout.write(file)
154
    sys.stdout.write(file)
149
    sys.stdout.flush()
155
    sys.stdout.flush()
150
    py_compile.compile(filepath, filepath + 'o', path)
156
    if hasattr(imp, 'get_tag'):
157
        py_compile.compile(filepath, imp.cache_from_source(filepath, False), path)
158
    else:
159
        py_compile.compile(filepath, filepath + 'o', path)
151
sys.stdout.write('\n')" 2>/dev/null || :
160
sys.stdout.write('\n')" 2>/dev/null || :
152
161
153
# Local Variables:
162
# Local Variables:

Return to bug 448896