<s> """<STR_LIT>""" <EOL> DOCLINES = __doc__ . split ( "<STR_LIT:\n>" ) <EOL> import os <EOL> import shutil <EOL> import sys <EOL> import re <EOL> import subprocess <EOL> import glob <EOL> if sys . version_info [ <NUM_LIT:0> ] < <NUM_LIT:3> : <EOL> import __builtin__ as builtins <EOL> else : <EOL> import builtins <EOL> CLASSIFIERS = """<STR_LIT>""" <EOL> NAME = '<STR_LIT>' <EOL> MAINTAINER = "<STR_LIT>" <EOL> MAINTAINER_EMAIL = "<STR_LIT>" <EOL> DESCRIPTION = DOCLINES [ <NUM_LIT:0> ] <EOL> LONG_DESCRIPTION = "<STR_LIT:\n>" . join ( DOCLINES [ <NUM_LIT:2> : ] ) <EOL> URL = "<STR_LIT>" <EOL> DOWNLOAD_URL = "<STR_LIT>" <EOL> LICENSE = '<STR_LIT>' <EOL> CLASSIFIERS = filter ( None , CLASSIFIERS . split ( '<STR_LIT:\n>' ) ) <EOL> PLATFORMS = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> MAJOR = <NUM_LIT:1> <EOL> MINOR = <NUM_LIT:7> <EOL> MICRO = <NUM_LIT:0> <EOL> ISRELEASED = False <EOL> VERSION = '<STR_LIT>' % ( MAJOR , MINOR , MICRO ) <EOL> SCRIPTS = glob . glob ( '<STR_LIT>' ) <EOL> def git_version ( ) : <EOL> def _minimal_ext_cmd ( cmd ) : <EOL> env = { } <EOL> for k in [ '<STR_LIT>' , '<STR_LIT>' ] : <EOL> v = os . environ . get ( k ) <EOL> if v is not None : <EOL> env [ k ] = v <EOL> env [ '<STR_LIT>' ] = '<STR_LIT:C>' <EOL> env [ '<STR_LIT>' ] = '<STR_LIT:C>' <EOL> env [ '<STR_LIT>' ] = '<STR_LIT:C>' <EOL> out = subprocess . Popen ( <EOL> cmd , stdout = subprocess . PIPE , env = env ) . communicate ( ) [ <NUM_LIT:0> ] <EOL> return out <EOL> try : <EOL> out = _minimal_ext_cmd ( [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> GIT_REVISION = out . strip ( ) . decode ( '<STR_LIT:ascii>' ) <EOL> except OSError : <EOL> GIT_REVISION = "<STR_LIT>" <EOL> return GIT_REVISION <EOL> if os . path . exists ( '<STR_LIT>' ) : <EOL> os . remove ( '<STR_LIT>' ) <EOL> builtins . __PYART_SETUP__ = True <EOL> def write_version_py ( filename = '<STR_LIT>' ) : <EOL> cnt = """<STR_LIT>""" <EOL> FULLVERSION = VERSION <EOL> if os . path . exists ( '<STR_LIT>' ) : <EOL> GIT_REVISION = git_version ( ) <EOL> elif os . path . exists ( '<STR_LIT>' ) : <EOL> try : <EOL> from pyart . version import git_revision as GIT_REVISION <EOL> except ImportError : <EOL> raise ImportError ( "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> else : <EOL> GIT_REVISION = "<STR_LIT>" <EOL> if not ISRELEASED : <EOL> FULLVERSION += '<STR_LIT>' + GIT_REVISION [ : <NUM_LIT:7> ] <EOL> a = open ( filename , '<STR_LIT:w>' ) <EOL> try : <EOL> a . write ( cnt % { '<STR_LIT:version>' : VERSION , <EOL> '<STR_LIT>' : FULLVERSION , <EOL> '<STR_LIT>' : GIT_REVISION , <EOL> '<STR_LIT>' : str ( ISRELEASED ) } ) <EOL> finally : <EOL> a . close ( ) <EOL> def configuration ( parent_package = '<STR_LIT>' , top_path = None ) : <EOL> from numpy . distutils . misc_util import Configuration <EOL> config = Configuration ( None , parent_package , top_path ) <EOL> config . set_options ( ignore_setup_xxx_py = True , <EOL> assume_default_configuration = True , <EOL> delegate_options_to_subpackages = True , <EOL> quiet = True ) <EOL> config . add_subpackage ( '<STR_LIT>' ) <EOL> config . add_data_files ( ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> return config <EOL> def setup_package ( ) : <EOL> write_version_py ( ) <EOL> from numpy . distutils . core import setup <EOL> setup ( <EOL> name = NAME , <EOL> maintainer = MAINTAINER , <EOL> maintainer_email = MAINTAINER_EMAIL , <EOL> description = DESCRIPTION , <EOL> long_description = LONG_DESCRIPTION , <EOL> url = URL , <EOL> version = VERSION , <EOL> download_url = DOWNLOAD_URL , <EOL> license = LICENSE , <EOL> classifiers = CLASSIFIERS , <EOL> platforms = PLATFORMS , <EOL> configuration = configuration , <EOL> scripts = SCRIPTS , <EOL> ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> setup_package ( ) </s>
