<s> import os <EOL> import sys <EOL> import fnmatch <EOL> import subprocess <EOL> from distutils . core import Command <EOL> from setuptools import setup , find_packages <EOL> import version <EOL> long_description = """<STR_LIT>""" <EOL> class rpm ( 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> if has_subprocess : <EOL> status = subprocess . call ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> if status : <EOL> raise RuntimeError ( "<STR_LIT>" ) <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" <EOL> else : <EOL> print """<STR_LIT>""" <EOL> class doc ( Command ) : <EOL> description = "<STR_LIT>" <EOL> user_options = [ ( "<STR_LIT:test>" , "<STR_LIT:t>" , <EOL> "<STR_LIT>" ) ] <EOL> boolean_options = [ "<STR_LIT:test>" ] <EOL> def initialize_options ( self ) : <EOL> self . test = False <EOL> def finalize_options ( self ) : <EOL> pass <EOL> def run ( self ) : <EOL> if self . test : <EOL> path = "<STR_LIT>" <EOL> mode = "<STR_LIT>" <EOL> else : <EOL> path = "<STR_LIT>" % __version__ <EOL> mode = "<STR_LIT:html>" <EOL> try : <EOL> os . makedirs ( path ) <EOL> except : <EOL> pass <EOL> if has_subprocess : <EOL> status = subprocess . call ( [ "<STR_LIT>" , "<STR_LIT>" , mode , "<STR_LIT>" , path ] ) <EOL> if status : <EOL> raise RuntimeError ( "<STR_LIT>" % mode ) <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" % mode <EOL> print "<STR_LIT>" % path <EOL> else : <EOL> print """<STR_LIT>""" <EOL> class PyTest ( Command ) : <EOL> '''<STR_LIT>''' <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> cmd = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> if self . distribution . install_requires : <EOL> cmd . extend ( self . distribution . install_requires ) <EOL> if self . distribution . tests_require : <EOL> cmd . extend ( self . distribution . tests_require ) <EOL> errno = subprocess . call ( cmd ) <EOL> if errno : <EOL> raise SystemExit ( errno ) <EOL> import site <EOL> site . main ( ) <EOL> print sys . path <EOL> pytest = __import__ ( '<STR_LIT>' ) <EOL> exitcode = pytest . main ( [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> sys . exit ( exitcode ) <EOL> VERSION , HASH = version . get_git_version ( ) <EOL> setup ( <EOL> name = '<STR_LIT>' , <EOL> version = VERSION , <EOL> author = '<STR_LIT>' , <EOL> author_email = '<STR_LIT>' , <EOL> maintainer = '<STR_LIT>' , <EOL> maintainer_email = '<STR_LIT>' , <EOL> license = '<STR_LIT>' , <EOL> description = '<STR_LIT>' , <EOL> long_description = long_description , <EOL> url = '<STR_LIT>' , <EOL> keywords = '<STR_LIT>' , <EOL> packages = [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ] , <EOL> install_requires = [ '<STR_LIT>' ] , <EOL> tests_require = [ <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> cmdclass = dict ( <EOL> doc = doc , <EOL> rpm = rpm , <EOL> test = PyTest , <EOL> ) , <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> ] , <EOL> ) </s>
