# Path: stagehand/toolbox/xmlconfig.py
# def get_value(value, type):
# def format_content(node):
# def nodefilter(node, *names):
#     def __init__(self, package):
#     def _get_schema(self, node):
#     def parse(self, node, fd, deep=''):
#     def _parse_var(self, node, fd, deep, first, defaults_list):
#     def _parse_config(self, node, fd, deep, first, defaults):
#     def _parse_group(self, node, fd, deep, first, defaults):
#     def _parse_list(self, node, fd, deep, first, defaults):
#     def _parse_dict(self, node, fd, deep, first, defaults):
# def _convert(xml, out, package, cfgmodule):
# def convert(infile, outfile, package, cfgmodule='config'):
# def to_code(xml, package=None, cfgmodule='config'):
# def to_object(xml, package=None, cfgmodule='config'):
# class Parser:
# 
# Path: stagehand/coffee.py
# class CSCompileError(ValueError):
# def cscompile(src, dst=None, is_html=None):
#     def subfunc(match):
# def cscompile_with_cache(src, cachedir, is_html=None):


import sys
import os
import platform
import glob
import shutil
from distutils.command.build_scripts import build_scripts as _build_scripts
from distutils.command.build_py import build_py as _build_py
from distutils.cmd import Command
from distutils.core import setup
from distutils import log
from stagehand.toolbox import xmlconfig
from stagehand import coffee
            os.makedirs(dst_dir, exist_ok=True)
            for name in names:
                if os.path.splitext(name)[1] in ('.tmpl', '.coffee', '.swp'):
                    continue
                src = os.path.join(root, name)
                dst = os.path.join(dst_dir, name)
                if os.path.exists(dst) and os.path.getmtime(src) > os.path.getmtime(dst):
                    print('copying {} -> {}'.format(src, dst))
                shutil.copy2(src, dst)


    def run(self):
        super().run()
        build_scripts = self.get_finalized_command('build_scripts')
        build_scripts.run()

        bdist = self.get_finalized_command('bdist')
        os.makedirs(bdist.bdist_base, exist_ok=True)
        os.makedirs(bdist.dist_dir, exist_ok=True)

        self.copy_data('data')

        print('generating __init__.py')
        with open('stagehand/__init__.py', 'w') as f:
            f.write("# Auto-generated from setup.py\n__version__ = '{}'\n".format(version))

        print('generating __main__.py')
        with open(os.path.join(self.build_lib, '__main__.py'), 'w') as f:
            f.write('# This is a generated file.\nimport stagehand.bootstrap\n')


# Path: stagehand/toolbox/xmlconfig.py
# def get_value(value, type):
# def format_content(node):
# def nodefilter(node, *names):
#     def __init__(self, package):
#     def _get_schema(self, node):
#     def parse(self, node, fd, deep=''):
#     def _parse_var(self, node, fd, deep, first, defaults_list):
#     def _parse_config(self, node, fd, deep, first, defaults):
#     def _parse_group(self, node, fd, deep, first, defaults):
#     def _parse_list(self, node, fd, deep, first, defaults):
#     def _parse_dict(self, node, fd, deep, first, defaults):
# def _convert(xml, out, package, cfgmodule):
# def convert(infile, outfile, package, cfgmodule='config'):
# def to_code(xml, package=None, cfgmodule='config'):
# def to_object(xml, package=None, cfgmodule='config'):
# class Parser:
# 
# Path: stagehand/coffee.py
# class CSCompileError(ValueError):
# def cscompile(src, dst=None, is_html=None):
#     def subfunc(match):
# def cscompile_with_cache(src, cachedir, is_html=None):


# Path: setup.py
import sys
import os
import platform
import glob
import shutil
from distutils.command.build_scripts import build_scripts as _build_scripts
from distutils.command.build_py import build_py as _build_py
from distutils.cmd import Command
from distutils.core import setup
from distutils import log
from stagehand.toolbox import xmlconfig
from stagehand import coffee

            os.makedirs(dst_dir, exist_ok=True)
            for name in names:
                if os.path.splitext(name)[1] in ('.tmpl', '.coffee', '.swp'):
                    continue
                src = os.path.join(root, name)
                dst = os.path.join(dst_dir, name)
                if os.path.exists(dst) and os.path.getmtime(src) > os.path.getmtime(dst):
                    print('copying {} -> {}'.format(src, dst))
                shutil.copy2(src, dst)


    def run(self):
        super().run()
        build_scripts = self.get_finalized_command('build_scripts')
        build_scripts.run()

        bdist = self.get_finalized_command('bdist')
        os.makedirs(bdist.bdist_base, exist_ok=True)
        os.makedirs(bdist.dist_dir, exist_ok=True)

        self.copy_data('data')

        print('generating __init__.py')
        with open('stagehand/__init__.py', 'w') as f:
            f.write("# Auto-generated from setup.py\n__version__ = '{}'\n".format(version))

        print('generating __main__.py')
        with open(os.path.join(self.build_lib, '__main__.py'), 'w') as f:
            f.write('# This is a generated file.\nimport stagehand.bootstrap\n')


        name = self.distribution.metadata.name