home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_2406 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  1.8 KB  |  47 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from distutils.command.bdist_wininst import bdist_wininst as _bdist_wininst
  5. import os
  6. import sys
  7.  
  8. class bdist_wininst(_bdist_wininst):
  9.     
  10.     def create_exe(self, arcname, fullname, bitmap = None):
  11.         _bdist_wininst.create_exe(self, arcname, fullname, bitmap)
  12.         dist_files = getattr(self.distribution, 'dist_files', [])
  13.         if self.target_version:
  14.             installer_name = os.path.join(self.dist_dir, '%s.win32-py%s.exe' % (fullname, self.target_version))
  15.             pyversion = self.target_version
  16.             bad = ('bdist_wininst', 'any', installer_name)
  17.             if bad in dist_files:
  18.                 dist_files.remove(bad)
  19.             
  20.         else:
  21.             installer_name = os.path.join(self.dist_dir, '%s.win32.exe' % fullname)
  22.             pyversion = 'any'
  23.         good = ('bdist_wininst', pyversion, installer_name)
  24.         if good not in dist_files:
  25.             dist_files.append(good)
  26.         
  27.  
  28.     
  29.     def reinitialize_command(self, command, reinit_subcommands = 0):
  30.         cmd = self.distribution.reinitialize_command(command, reinit_subcommands)
  31.         if command in ('install', 'install_lib'):
  32.             cmd.install_lib = None
  33.         
  34.         return cmd
  35.  
  36.     
  37.     def run(self):
  38.         self._is_running = True
  39.         
  40.         try:
  41.             _bdist_wininst.run(self)
  42.         finally:
  43.             self._is_running = False
  44.  
  45.  
  46.  
  47.