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

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from distutils.core import Extension as _Extension
  5. from dist import _get_unpatched
  6. _Extension = _get_unpatched(_Extension)
  7.  
  8. try:
  9.     from Pyrex.Distutils.build_ext import build_ext
  10. except ImportError:
  11.     have_pyrex = False
  12.  
  13. have_pyrex = True
  14.  
  15. class Extension(_Extension):
  16.     if not have_pyrex:
  17.         
  18.         def __init__(self, *args, **kw):
  19.             _Extension.__init__(self, *args, **kw)
  20.             sources = []
  21.             for s in self.sources:
  22.                 if s.endswith('.pyx'):
  23.                     sources.append(s[:-3] + 'c')
  24.                     continue
  25.                 sources.append(s)
  26.             
  27.             self.sources = sources
  28.  
  29.     
  30.  
  31.  
  32. class Library(Extension):
  33.     pass
  34.  
  35. import sys
  36. import distutils.core as distutils
  37. import distutils.extension as distutils
  38. distutils.core.Extension = Extension
  39. distutils.extension.Extension = Extension
  40. if 'distutils.command.build_ext' in sys.modules:
  41.     sys.modules['distutils.command.build_ext'].Extension = Extension
  42.  
  43.