~ubuntu-branches/ubuntu/lucid/awn-extras-applets/lucid

« back to all changes in this revision

Viewing changes to py-compile

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2010-03-30 20:26:40 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100330202640-vza3bdnv9gc9bg5z
Tags: 0.4.0~rc1-0ubuntu1
* New upstream release (rc1) (LP: #551309)
 - Stack applet close on click (LP: #261520)
* debian/patches/
 - 03-remove-cairo-menu-pref.patch: From upstream (r1244 + r1245 + r1252),
   remove menu entry for cairo-menu preferences, it's not implemented
   (LP: #511254)
 - 04-tomboy-threading-free.patch: From upstream (r1246), remove threading to
   make the applet working. 
* debian/*.install: Update installation location of comics and digital 
  applets.
* debian/control: 
 - Move digital applet from python to C, and add proper Replaces.
 - Add Replaces for awn-applets-c-core to handle migration from 0.3.2.2.
   (LP: #524559)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
# py-compile - Compile a Python program
3
3
 
4
 
scriptversion=2009-04-28.21; # UTC
 
4
scriptversion=2005-05-14.22
5
5
 
6
 
# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software
7
 
# Foundation, Inc.
 
6
# Copyright (C) 2000, 2001, 2003, 2004, 2005  Free Software Foundation, Inc.
8
7
 
9
8
# This program is free software; you can redistribute it and/or modify
10
9
# it under the terms of the GNU General Public License as published by
17
16
# GNU General Public License for more details.
18
17
 
19
18
# You should have received a copy of the GNU General Public License
20
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
19
# along with this program; if not, write to the Free Software
 
20
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
21
# 02110-1301, USA.
21
22
 
22
23
# As a special exception to the GNU General Public License, if you
23
24
# distribute this file as part of a program that contains a
102
103
fi
103
104
 
104
105
$PYTHON -c "
105
 
import sys, os, py_compile
 
106
import sys, os, string, py_compile
106
107
 
107
108
files = '''$files'''
108
109
 
109
 
sys.stdout.write('Byte-compiling python modules...\n')
110
 
for file in files.split():
 
110
print 'Byte-compiling python modules...'
 
111
for file in string.split(files):
111
112
    $pathtrans
112
113
    $filetrans
113
114
    if not os.path.exists(filepath) or not (len(filepath) >= 3
114
115
                                            and filepath[-3:] == '.py'):
115
 
            continue
116
 
    sys.stdout.write(file)
 
116
        continue
 
117
    print file,
117
118
    sys.stdout.flush()
118
119
    py_compile.compile(filepath, filepath + 'c', path)
119
 
sys.stdout.write('\n')" || exit $?
 
120
print" || exit $?
120
121
 
121
122
# this will fail for python < 1.5, but that doesn't matter ...
122
123
$PYTHON -O -c "
123
 
import sys, os, py_compile
 
124
import sys, os, string, py_compile
124
125
 
125
126
files = '''$files'''
126
 
sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
127
 
for file in files.split():
 
127
print 'Byte-compiling python modules (optimized versions) ...'
 
128
for file in string.split(files):
128
129
    $pathtrans
129
130
    $filetrans
130
131
    if not os.path.exists(filepath) or not (len(filepath) >= 3
131
132
                                            and filepath[-3:] == '.py'):
132
 
            continue
133
 
    sys.stdout.write(file)
 
133
        continue
 
134
    print file,
134
135
    sys.stdout.flush()
135
136
    py_compile.compile(filepath, filepath + 'o', path)
136
 
sys.stdout.write('\n')" 2>/dev/null || :
 
137
print" 2>/dev/null || :
137
138
 
138
139
# Local Variables:
139
140
# mode: shell-script
141
142
# eval: (add-hook 'write-file-hooks 'time-stamp)
142
143
# time-stamp-start: "scriptversion="
143
144
# time-stamp-format: "%:y-%02m-%02d.%02H"
144
 
# time-stamp-time-zone: "UTC"
145
 
# time-stamp-end: "; # UTC"
 
145
# time-stamp-end: "$"
146
146
# End: