<s> """<STR_LIT>""" <EOL> import sys <EOL> import os <EOL> import datetime <EOL> from distutils . command . build_py import build_py as _build_py <EOL> def get_version ( ) : <EOL> """<STR_LIT>""" <EOL> import imp <EOL> source_dir = '<STR_LIT>' <EOL> with open ( '<STR_LIT>' . format ( source_dir ) , '<STR_LIT:rb>' ) as fp : <EOL> mod = imp . load_source ( '<STR_LIT>' , source_dir , fp ) <EOL> return mod . version <EOL> setup_requires = [ '<STR_LIT>' ] <EOL> install_requires = [ '<STR_LIT>' ] <EOL> options = { } <EOL> scripts = [ ] <EOL> cxFreezeExecutables = [ ] <EOL> cmdclass = { } <EOL> build_py27_unmodified = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ] <EOL> build_py27_excluded = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ] <EOL> def match_patterns ( path , pattern_list = [ ] ) : <EOL> from fnmatch import fnmatch <EOL> for pattern in pattern_list : <EOL> if fnmatch ( path , pattern ) : <EOL> return True <EOL> return False <EOL> class build_py27 ( _build_py ) : <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> _build_py . __init__ ( self , * args , ** kwargs ) <EOL> import logging <EOL> from lib2to3 import refactor <EOL> import lib3to2 . main <EOL> rt_logger = logging . getLogger ( "<STR_LIT>" ) <EOL> rt_logger . addHandler ( logging . StreamHandler ( ) ) <EOL> fixers = refactor . get_fixers_from_package ( '<STR_LIT>' ) <EOL> fixers . remove ( '<STR_LIT>' ) <EOL> self . rtool = lib3to2 . main . StdoutRefactoringTool ( <EOL> fixers , <EOL> None , <EOL> [ ] , <EOL> False , <EOL> False <EOL> ) <EOL> def copy_file ( self , source , target , preserve_mode = True ) : <EOL> if match_patterns ( source , build_py27_unmodified ) : <EOL> _build_py . copy_file ( self , source , target , preserve_mode ) <EOL> elif match_patterns ( source , build_py27_excluded ) : <EOL> print ( "<STR_LIT>" % source ) <EOL> elif source . endswith ( '<STR_LIT>' ) : <EOL> try : <EOL> print ( "<STR_LIT>" % ( source , target ) ) <EOL> with open ( source , '<STR_LIT>' ) as input : <EOL> source_content = input . read ( ) + "<STR_LIT:\n>" <EOL> nval = self . rtool . refactor_string ( source_content , source ) <EOL> if nval is not None : <EOL> with open ( target , '<STR_LIT>' ) as output : <EOL> output . write ( '<STR_LIT>' ) <EOL> output . write ( str ( nval ) ) <EOL> else : <EOL> raise ( Exception ( "<STR_LIT>" % source ) ) <EOL> except Exception as e : <EOL> print ( "<STR_LIT>" % ( source , target , e ) ) <EOL> if sys . version_info [ <NUM_LIT:0> ] < <NUM_LIT:3> : <EOL> setup_requires . append ( '<STR_LIT>' ) <EOL> cmdclass [ '<STR_LIT>' ] = build_py27 <EOL> try : <EOL> import sphinx . setup_command <EOL> class build_sphinx_py27 ( sphinx . setup_command . BuildDoc ) : <EOL> def run ( self ) : <EOL> self . run_command ( '<STR_LIT>' ) <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . abspath ( "<STR_LIT>" ) ) <EOL> sphinx . setup_command . BuildDoc . run ( self ) <EOL> if sys . version_info [ <NUM_LIT:0> ] < <NUM_LIT:3> : <EOL> setup_requires . append ( '<STR_LIT>' ) <EOL> setup_requires . append ( '<STR_LIT>' ) <EOL> cmdclass [ '<STR_LIT>' ] = build_sphinx_py27 <EOL> except ImportError as e : <EOL> print ( "<STR_LIT>" % e ) <EOL> '''<STR_LIT>''' <EOL> if sys . platform in ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) : <EOL> from setuptools import find_packages <EOL> try : <EOL> from cx_Freeze import setup , Executable <EOL> cx_FreezeExecutables = [ <EOL> Executable ( script = "<STR_LIT>" , targetName = "<STR_LIT>" ) , <EOL> Executable ( script = "<STR_LIT>" ) <EOL> ] <EOL> except : <EOL> from setuptools import setup <EOL> cx_FreezeExecutables = [ ] <EOL> packages = find_packages ( <EOL> '<STR_LIT:.>' , <EOL> exclude = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> ) <EOL> dataFiles = [ ] <EOL> includeFiles = [ <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> ] <EOL> if sys . platform == '<STR_LIT>' : <EOL> includeFiles . append ( ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> else : <EOL> includeFiles . append ( ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> if os . path . exists ( "<STR_LIT>" ) : <EOL> includeFiles . append ( ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> includeFiles . append ( ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> includeFiles . append ( ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> includeFiles . append ( ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> includeFiles . append ( ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> if os . path . exists ( "<STR_LIT>" ) : <EOL> includeFiles . append ( ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> includeLibs = [ <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ] <EOL> if os . path . exists ( "<STR_LIT>" ) : <EOL> includeLibs += [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ] <EOL> import matplotlib <EOL> dataFiles += matplotlib . get_py2exe_datafiles ( ) <EOL> if sys . platform != '<STR_LIT>' : <EOL> try : <EOL> import pyodbc <EOL> includeLibs . append ( '<STR_LIT>' ) <EOL> except ImportError : <EOL> pass <EOL> options = dict ( <EOL> build_exe = { <EOL> "<STR_LIT>" : includeFiles , <EOL> "<STR_LIT>" : includeLibs , <EOL> "<STR_LIT>" : packages , <EOL> } <EOL> ) <EOL> if sys . platform == '<STR_LIT>' : <EOL> options [ "<STR_LIT>" ] = { <EOL> "<STR_LIT>" : '<STR_LIT>' , <EOL> "<STR_LIT>" : '<STR_LIT>' <EOL> } <EOL> elif sys . platform == '<STR_LIT:win32>' : <EOL> from setuptools import find_packages <EOL> from cx_Freeze import setup , Executable <EOL> packages = find_packages ( '<STR_LIT:.>' ) <EOL> print ( "<STR_LIT>" . format ( packages ) ) <EOL> dataFiles = None <EOL> win32includeFiles = [ <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> ] <EOL> if '<STR_LIT>' in packages : <EOL> win32includeFiles . append ( '<STR_LIT>' ) <EOL> if os . path . exists ( "<STR_LIT>" ) : <EOL> win32includeFiles . append ( '<STR_LIT>' ) <EOL> includeLibs = [ <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ] <EOL> if os . path . exists ( "<STR_LIT>" ) : <EOL> includeLibs += [ <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" <EOL> ] <EOL> options = dict ( <EOL> build_exe = { <EOL> "<STR_LIT>" : win32includeFiles , <EOL> "<STR_LIT>" : True , <EOL> "<STR_LIT>" : packages , <EOL> "<STR_LIT>" : includeLibs <EOL> } <EOL> ) <EOL> cx_FreezeExecutables = [ <EOL> Executable ( <EOL> script = "<STR_LIT>" , <EOL> base = "<STR_LIT>" , <EOL> icon = '<STR_LIT>' , <EOL> ) , <EOL> Executable ( <EOL> script = "<STR_LIT>" , <EOL> ) <EOL> ] <EOL> else : <EOL> from setuptools import os , setup , find_packages <EOL> packages = find_packages ( <EOL> '<STR_LIT:.>' , <EOL> exclude = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> ) <EOL> dataFiles = [ ( <EOL> '<STR_LIT>' , <EOL> [ '<STR_LIT>' + f for f in os . listdir ( '<STR_LIT>' ) ] <EOL> ) ] <EOL> cx_FreezeExecutables = [ ] <EOL> timestamp = datetime . datetime . utcnow ( ) <EOL> setup ( <EOL> name = '<STR_LIT>' , <EOL> version = get_version ( ) , <EOL> description = '<STR_LIT>' , <EOL> long_description = open ( '<STR_LIT>' ) . read ( ) , <EOL> author = '<STR_LIT>' , <EOL> author_email = '<STR_LIT>' , <EOL> url = '<STR_LIT>' , <EOL> download_url = '<STR_LIT>' , <EOL> cmdclass = cmdclass , <EOL> include_package_data = True , <EOL> packages = packages , <EOL> data_files = dataFiles , <EOL> platforms = [ '<STR_LIT>' ] , <EOL> license = '<STR_LIT>' , <EOL> keywords = [ '<STR_LIT>' ] , <EOL> classifiers = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] , <EOL> scripts = scripts , <EOL> entry_points = { <EOL> '<STR_LIT>' : [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] <EOL> } , <EOL> setup_requires = setup_requires , <EOL> install_requires = install_requires , <EOL> options = options , <EOL> executables = cx_FreezeExecutables , <EOL> ) </s>
