<s> import os <EOL> import sys <EOL> from setuptools import setup , find_packages <EOL> from shutil import rmtree <EOL> from mezzanine import __version__ as version <EOL> exclude = [ "<STR_LIT>" , <EOL> "<STR_LIT>" ] <EOL> if sys . argv == [ "<STR_LIT>" , "<STR_LIT:test>" ] : <EOL> exclude = [ ] <EOL> exclude = dict ( [ ( e , None ) for e in exclude ] ) <EOL> for e in exclude : <EOL> if e . endswith ( "<STR_LIT>" ) : <EOL> try : <EOL> os . remove ( "<STR_LIT>" % e ) <EOL> except : <EOL> pass <EOL> try : <EOL> with open ( e , "<STR_LIT:r>" ) as f : <EOL> exclude [ e ] = ( f . read ( ) , os . stat ( e ) ) <EOL> os . remove ( e ) <EOL> except : <EOL> pass <EOL> if sys . argv [ : <NUM_LIT:2> ] == [ "<STR_LIT>" , "<STR_LIT>" ] : <EOL> try : <EOL> rmtree ( "<STR_LIT>" ) <EOL> except : <EOL> pass <EOL> try : <EOL> setup ( <EOL> name = "<STR_LIT>" , <EOL> version = version , <EOL> author = "<STR_LIT>" , <EOL> author_email = "<STR_LIT>" , <EOL> description = "<STR_LIT>" <EOL> "<STR_LIT>" , <EOL> long_description = open ( "<STR_LIT>" , '<STR_LIT:rb>' ) . read ( ) . decode ( '<STR_LIT:utf-8>' ) , <EOL> license = "<STR_LIT>" , <EOL> url = "<STR_LIT>" , <EOL> zip_safe = False , <EOL> include_package_data = True , <EOL> packages = find_packages ( ) , <EOL> install_requires = [ <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 = """<STR_LIT>""" , <EOL> test_suite = "<STR_LIT>" , <EOL> tests_require = [ "<STR_LIT>" , "<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> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> finally : <EOL> for e in exclude : <EOL> if exclude [ e ] is not None : <EOL> data , stat = exclude [ e ] <EOL> try : <EOL> with open ( e , "<STR_LIT:w>" ) as f : <EOL> f . write ( data ) <EOL> os . chown ( e , stat . st_uid , stat . st_gid ) <EOL> os . chmod ( e , stat . st_mode ) <EOL> except : <EOL> pass </s>
