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

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from setuptools.extension import Extension, Library
  5. from setuptools.dist import Distribution, Feature, _get_unpatched
  6. import distutils.core as distutils
  7. import setuptools.command as setuptools
  8. from setuptools.depends import Require
  9. from distutils.core import Command as _Command
  10. from distutils.util import convert_path
  11. import os.path as os
  12. __version__ = '0.6c9'
  13. __all__ = [
  14.     'setup',
  15.     'Distribution',
  16.     'Feature',
  17.     'Command',
  18.     'Extension',
  19.     'Require',
  20.     'find_packages']
  21. bootstrap_install_from = None
  22.  
  23. def find_packages(where = '.', exclude = ()):
  24.     out = []
  25.     stack = [
  26.         (convert_path(where), '')]
  27.     while stack:
  28.         (where, prefix) = stack.pop(0)
  29.         for name in os.listdir(where):
  30.             fn = os.path.join(where, name)
  31.             if '.' not in name and os.path.isdir(fn) and os.path.isfile(os.path.join(fn, '__init__.py')):
  32.                 out.append(prefix + name)
  33.                 stack.append((fn, prefix + name + '.'))
  34.                 continue
  35.         
  36.     for pat in list(exclude) + [
  37.         'ez_setup']:
  38.         fnmatchcase = fnmatchcase
  39.         import fnmatch
  40.         out = _[1]
  41.     
  42.     return out
  43.  
  44. setup = distutils.core.setup
  45. _Command = _get_unpatched(_Command)
  46.  
  47. class Command(_Command):
  48.     __doc__ = _Command.__doc__
  49.     command_consumes_arguments = False
  50.     
  51.     def __init__(self, dist, **kw):
  52.         _Command.__init__(self, dist)
  53.         for k, v in kw.items():
  54.             setattr(self, k, v)
  55.         
  56.  
  57.     
  58.     def reinitialize_command(self, command, reinit_subcommands = 0, **kw):
  59.         cmd = _Command.reinitialize_command(self, command, reinit_subcommands)
  60.         for k, v in kw.items():
  61.             setattr(cmd, k, v)
  62.         
  63.         return cmd
  64.  
  65.  
  66. import distutils.core as distutils
  67. distutils.core.Command = Command
  68.  
  69. def findall(dir = os.curdir):
  70.     all_files = []
  71.     for base, dirs, files in os.walk(dir):
  72.         if base == os.curdir or base.startswith(os.curdir + os.sep):
  73.             base = base[2:]
  74.         
  75.         all_files.extend(filter(os.path.isfile, files))
  76.     
  77.     return all_files
  78.  
  79. import distutils.filelist as distutils
  80. distutils.filelist.findall = findall
  81.