Changeset 4275
- Timestamp:
- 03/05/09 01:22:36 (4 years ago)
- Files:
-
- 1 modified
-
trunk/setup.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/setup.py
r4273 r4275 4 4 # Copyright (C) 2007-2008 Adriano Monteiro Marques 5 5 # 6 # Author: Adriano Monteiro Marques <adriano@umitproject.org> 6 # Authors: Adriano Monteiro Marques <adriano@umitproject.org> 7 # Guilherme Polo <ggpolo@gmail.com> 7 8 # 8 9 # This program is free software; you can redistribute it and/or modify … … 117 118 118 119 (ICONS_DIR, 119 glob(os.path.join( 'share', 'icons', 'umit', '*.ico')) +120 glob(os.path.join( 'share', 'icons', 'umit', '*.png'))),120 glob(os.path.join(ICONS_DIR, '*.ico')) + 121 glob(os.path.join(ICONS_DIR, '*.png'))), 121 122 122 123 (DOCS_DIR, … … 154 155 full_path = os.path.join(path , "LC_MESSAGES", "umit.mo") 155 156 self.mkpath(os.path.dirname(full_path)) 156 self.announce("Compiling %s -> %s" % (t[0], full_path))157 self.announce("Compiling %s -> %s" % (t[0], full_path)) 157 158 msgfmt.make(t[0], full_path, False) 158 159 # like guess … … 181 182 uninstaller_filename = os.path.join( 182 183 self.install_scripts, "uninstall_umit") 183 uninstaller = """#!/usr/bin/env python 184 import os, os.path, sys 185 186 print 187 print '%(line)s Uninstall Umit %(version)s %(line)s' 188 print 189 190 answer = raw_input('Are you sure that you want to completly uninstall \ 191 Umit %(version)s? (yes/no) ') 192 193 if answer != 'yes' and answer != 'y': 194 sys.exit(0) 195 196 print 197 print '%(line)s Uninstalling Umit %(version)s... %(line)s' 198 print 199 """ % {'version':VERSION, 'line':'-'*10} 184 uninstaller = [] 185 uninstaller.append( 186 "#!/usr/bin/env python\n" 187 "import os, sys\n" 188 "\n" 189 "print\n" 190 "print '%(line)s Uninstall Umit %(version)s %(line)s'\n" 191 "print\n" 192 "\n" 193 "answer = raw_input('Are you sure that you want to '\n" 194 " 'completly uninstall Umit %(version)s? (yes/no) ')\n" 195 "\n" 196 "if answer.lower() not in ['yes', 'y']:\n" 197 " sys.exit(0)\n" 198 "\n" 199 "print\n" 200 "print '%(line)s Uninstalling Umit %(version)s... %(line)s'\n" 201 "print\n" % {'version': VERSION, 'line': '-' * 10}) 200 202 201 203 for output in self.get_outputs(): 202 uninstaller += "print 'Removing %s...'\n" % output 203 uninstaller += "if os.path.exists('%s'): os.remove('%s')\n" % \ 204 (output, output) 205 206 uninstaller += "print 'Removing uninstaller itself...'\n" 207 uninstaller += "os.remove('%s')\n" % uninstaller_filename 204 uninstaller.append( 205 "print 'Removing %(output)s...'\n" 206 "if os.path.exists('%(output)s'):\n" 207 " os.remove('%(output)s')\n" % {'output': output}) 208 209 uninstaller.append( 210 "print 'Removing uninstaller itself...'\n" 211 "os.remove('%s')\n" % uninstaller_filename) 208 212 209 213 uninstaller_file = open(uninstaller_filename, 'w') 210 uninstaller_file.write (uninstaller)214 uninstaller_file.writelines(uninstaller) 211 215 uninstaller_file.close() 212 216 … … 349 353 cmdclasses.update(py2exe_cmdclass) 350 354 351 standard_options = dict(355 options = dict( 352 356 name = 'umit', 353 357 license = 'GNU GPL (version 2 or later)', … … 382 386 383 387 if py2exe_options: 384 standard_options.update(py2exe_options)388 options.update(py2exe_options) 385 389 386 390 if py2app_options: 387 standard_options.update(py2app_options)388 389 setup(** standard_options)391 options.update(py2app_options) 392 393 setup(**options)
