<s> import os <EOL> import codecs <EOL> try : <EOL> from setuptools import setup , find_packages , Command <EOL> except ImportError : <EOL> from ez_setup import use_setuptools <EOL> use_setuptools ( ) <EOL> from setuptools import setup , find_packages , Command <EOL> from distutils . command . install_data import install_data <EOL> from distutils . command . install import INSTALL_SCHEMES <EOL> import sys <EOL> import ghettoq <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> install_requires = [ ] <EOL> if sys . version_info < ( <NUM_LIT:2> , <NUM_LIT:5> ) : <EOL> install_requires . append ( "<STR_LIT>" ) <EOL> if sys . version_info < ( <NUM_LIT:2> , <NUM_LIT:7> ) : <EOL> install_requires . append ( "<STR_LIT>" ) <EOL> def osx_install_data ( install_data ) : <EOL> def finalize_options ( self ) : <EOL> self . set_undefined_options ( "<STR_LIT>" , ( "<STR_LIT>" , "<STR_LIT>" ) ) <EOL> install_data . finalize_options ( self ) <EOL> class RunTests ( Command ) : <EOL> description = "<STR_LIT>" <EOL> user_options = [ ] <EOL> def initialize_options ( self ) : <EOL> pass <EOL> def finalize_options ( self ) : <EOL> pass <EOL> def run ( self ) : <EOL> this_dir = os . getcwd ( ) <EOL> testproj_dir = os . path . join ( this_dir , "<STR_LIT>" ) <EOL> os . chdir ( testproj_dir ) <EOL> sys . path . insert ( <NUM_LIT:0> , testproj_dir ) <EOL> from django . core . management import execute_manager <EOL> os . environ [ "<STR_LIT>" ] = os . environ . get ( <EOL> "<STR_LIT>" , "<STR_LIT>" ) <EOL> settings_file = os . environ [ "<STR_LIT>" ] <EOL> settings_mod = __import__ ( settings_file , { } , { } , [ '<STR_LIT>' ] ) <EOL> execute_manager ( settings_mod , argv = [ <EOL> __file__ , "<STR_LIT:test>" ] ) <EOL> os . chdir ( this_dir ) <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 INSTALL_SCHEMES . values ( ) : <EOL> scheme [ '<STR_LIT:data>' ] = scheme [ '<STR_LIT>' ] <EOL> SKIP_EXTENSIONS = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> def is_unwanted_file ( filename ) : <EOL> for skip_ext in SKIP_EXTENSIONS : <EOL> if filename . endswith ( skip_ext ) : <EOL> return True <EOL> return False <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> elif is_unwanted_file ( filename ) : <EOL> pass <EOL> else : <EOL> data_files . append ( [ dirpath , [ os . path . join ( dirpath , f ) for f in <EOL> filenames ] ] ) <EOL> setup ( <EOL> name = '<STR_LIT>' , <EOL> version = ghettoq . __version__ , <EOL> description = ghettoq . __doc__ , <EOL> author = ghettoq . __author__ , <EOL> author_email = ghettoq . __contact__ , <EOL> url = ghettoq . __homepage__ , <EOL> platforms = [ "<STR_LIT>" ] , <EOL> license = '<STR_LIT>' , <EOL> packages = packages , <EOL> data_files = data_files , <EOL> cmdclass = { "<STR_LIT:test>" : RunTests } , <EOL> zip_safe = False , <EOL> test_suite = "<STR_LIT>" , <EOL> install_requires = install_requires , <EOL> classifiers = [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] , <EOL> long_description = codecs . open ( '<STR_LIT>' , "<STR_LIT:r>" , "<STR_LIT:utf-8>" ) . read ( ) , <EOL> ) </s>
