<s> import os <EOL> import sys <EOL> import codecs <EOL> extra = { } <EOL> tests_require = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> if sys . version_info < ( <NUM_LIT:2> , <NUM_LIT:7> ) : <EOL> raise Exception ( '<STR_LIT>' ) <EOL> try : <EOL> from setuptools import setup <EOL> except ImportError : <EOL> from distutils . core import setup <EOL> from distutils . command . install import INSTALL_SCHEMES <EOL> import re <EOL> re_meta = re . compile ( r'<STR_LIT>' ) <EOL> re_vers = re . compile ( r'<STR_LIT>' ) <EOL> re_doc = re . compile ( r'<STR_LIT>' ) <EOL> rq = lambda s : s . strip ( "<STR_LIT>" ) <EOL> def add_default ( m ) : <EOL> attr_name , attr_value = m . groups ( ) <EOL> return ( ( attr_name , rq ( attr_value ) ) , ) <EOL> def add_version ( m ) : <EOL> v = list ( map ( rq , m . groups ( ) [ <NUM_LIT:0> ] . split ( '<STR_LIT:U+002CU+0020>' ) ) ) <EOL> return ( ( '<STR_LIT>' , '<STR_LIT:.>' . join ( v [ <NUM_LIT:0> : <NUM_LIT:3> ] ) + '<STR_LIT>' . join ( v [ <NUM_LIT:3> : ] ) ) , ) <EOL> def add_doc ( m ) : <EOL> return ( ( '<STR_LIT>' , m . groups ( ) [ <NUM_LIT:0> ] ) , ) <EOL> pats = { re_meta : add_default , <EOL> re_vers : add_version , <EOL> re_doc : add_doc } <EOL> here = os . path . abspath ( os . path . dirname ( __file__ ) ) <EOL> meta_fh = open ( os . path . join ( here , '<STR_LIT>' ) ) <EOL> try : <EOL> meta = { } <EOL> for line in meta_fh : <EOL> if line . strip ( ) == '<STR_LIT>' : <EOL> break <EOL> for pattern , handler in pats . items ( ) : <EOL> m = pattern . match ( line . strip ( ) ) <EOL> if m : <EOL> meta . update ( handler ( m ) ) <EOL> finally : <EOL> meta_fh . close ( ) <EOL> packages , data_files = [ ] , [ ] <EOL> root_dir = os . path . dirname ( __file__ ) <EOL> if root_dir != '<STR_LIT>' : <EOL> os . chdir ( root_dir ) <EOL> src_dir = '<STR_LIT>' <EOL> def fullsplit ( path , result = None ) : <EOL> if result is None : <EOL> result = [ ] <EOL> head , tail = os . path . split ( path ) <EOL> if head == '<STR_LIT>' : <EOL> return [ tail ] + result <EOL> if head == path : <EOL> return result <EOL> return fullsplit ( head , [ tail ] + result ) <EOL> for scheme in list ( INSTALL_SCHEMES . values ( ) ) : <EOL> scheme [ '<STR_LIT:data>' ] = scheme [ '<STR_LIT>' ] <EOL> for dirpath , dirnames , filenames in os . walk ( src_dir ) : <EOL> for i , dirname in enumerate ( dirnames ) : <EOL> if dirname . startswith ( '<STR_LIT:.>' ) : <EOL> del dirnames [ i ] <EOL> for filename in filenames : <EOL> if filename . endswith ( '<STR_LIT>' ) : <EOL> packages . append ( '<STR_LIT:.>' . join ( fullsplit ( dirpath ) ) ) <EOL> else : <EOL> data_files . append ( [ dirpath , [ os . path . join ( dirpath , f ) for f in <EOL> filenames ] ] ) <EOL> if os . path . exists ( '<STR_LIT>' ) : <EOL> long_description = codecs . open ( '<STR_LIT>' , '<STR_LIT:r>' , '<STR_LIT:utf-8>' ) . read ( ) <EOL> else : <EOL> long_description = '<STR_LIT>' <EOL> install_requires = [ '<STR_LIT>' ] <EOL> setup ( <EOL> name = '<STR_LIT>' , <EOL> version = meta [ '<STR_LIT>' ] , <EOL> description = meta [ '<STR_LIT>' ] , <EOL> author = meta [ '<STR_LIT>' ] , <EOL> author_email = meta [ '<STR_LIT>' ] , <EOL> url = meta [ '<STR_LIT>' ] , <EOL> platforms = [ '<STR_LIT>' ] , <EOL> packages = packages , <EOL> data_files = data_files , <EOL> zip_safe = False , <EOL> test_suite = '<STR_LIT>' , <EOL> install_requires = install_requires , <EOL> tests_require = tests_require , <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> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] , <EOL> entry_points = { <EOL> '<STR_LIT>' : [ '<STR_LIT>' ] , <EOL> } , <EOL> long_description = long_description , <EOL> ** extra ) </s>
