Submitted By: Fernando de Oliveira <famobr at yahoo dot com dot br>
Date: 2013-11-23
Initial Package Version: 1.9
Upstream Status: Not Submitted
Origin: Fernando de Oliveira <famobr at yahoo dot com dot br>
Description: Fixes make install with Python3
old
|
new
|
|
99 | 117 | fi |
100 | 118 | |
101 | 119 | $PYTHON -c " |
102 | | import sys, os, string, py_compile |
| 120 | import sys, os, py_compile |
103 | 121 | |
104 | 122 | files = '''$files''' |
105 | 123 | |
106 | | print 'Byte-compiling python modules...' |
107 | | for file in string.split(files): |
| 124 | sys.stdout.write('Byte-compiling python modules...\n') |
| 125 | for file in files.split(): |
108 | 126 | $pathtrans |
109 | 127 | $filetrans |
110 | 128 | if not os.path.exists(filepath) or not (len(filepath) >= 3 |
111 | 129 | and filepath[-3:] == '.py'): |
112 | | continue |
113 | | print file, |
| 130 | continue |
| 131 | sys.stdout.write(file) |
114 | 132 | sys.stdout.flush() |
115 | 133 | py_compile.compile(filepath, filepath + 'c', path) |
116 | | print" || exit $? |
| 134 | sys.stdout.write('\n')" || exit $? |
117 | 135 | |
118 | 136 | # this will fail for python < 1.5, but that doesn't matter ... |
119 | 137 | $PYTHON -O -c " |
120 | | import sys, os, string, py_compile |
| 138 | import sys, os, py_compile |
121 | 139 | |
122 | 140 | files = '''$files''' |
123 | | print 'Byte-compiling python modules (optimized versions) ...' |
124 | | for file in string.split(files): |
| 141 | sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n') |
| 142 | for file in files.split(): |
125 | 143 | $pathtrans |
126 | 144 | $filetrans |
127 | 145 | if not os.path.exists(filepath) or not (len(filepath) >= 3 |
128 | 146 | and filepath[-3:] == '.py'): |
129 | | continue |
130 | | print file, |
| 147 | continue |
| 148 | sys.stdout.write(file) |
131 | 149 | sys.stdout.flush() |
132 | 150 | py_compile.compile(filepath, filepath + 'o', path) |
133 | | print" 2>/dev/null || : |
| 151 | sys.stdout.write('\n')" 2>/dev/null || : |
134 | 152 | |
135 | 153 | # Local Variables: |
136 | 154 | # mode: shell-script |