home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / distutils / command / install_headers.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  2.3 KB  |  50 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. """distutils.command.install_headers
  5.  
  6. Implements the Distutils 'install_headers' command, to install C/C++ header
  7. files to the Python include directory."""
  8. __revision__ = '$Id: install_headers.py 61000 2008-02-23 17:40:11Z christian.heimes $'
  9. from distutils.core import Command
  10.  
  11. class install_headers(Command):
  12.     description = 'install C/C++ header files'
  13.     user_options = [
  14.         ('install-dir=', 'd', 'directory to install header files to'),
  15.         ('force', 'f', 'force installation (overwrite existing files)')]
  16.     boolean_options = [
  17.         'force']
  18.     
  19.     def initialize_options(self):
  20.         self.install_dir = None
  21.         self.force = 0
  22.         self.outfiles = []
  23.  
  24.     
  25.     def finalize_options(self):
  26.         self.set_undefined_options('install', ('install_headers', 'install_dir'), ('force', 'force'))
  27.  
  28.     
  29.     def run(self):
  30.         headers = self.distribution.headers
  31.         if not headers:
  32.             return None
  33.         self.mkpath(self.install_dir)
  34.         for header in headers:
  35.             (out, _) = self.copy_file(header, self.install_dir)
  36.             self.outfiles.append(out)
  37.         
  38.  
  39.     
  40.     def get_inputs(self):
  41.         if not self.distribution.headers:
  42.             pass
  43.         return []
  44.  
  45.     
  46.     def get_outputs(self):
  47.         return self.outfiles
  48.  
  49.  
  50.