<s> from distutils . core import Command , setup <EOL> import logging . config <EOL> import os <EOL> import shutil <EOL> import sys <EOL> import unittest <EOL> import stomp <EOL> try : <EOL> logging . config . fileConfig ( '<STR_LIT>' ) <EOL> except : <EOL> pass <EOL> class TestCommand ( Command ) : <EOL> user_options = [ ( '<STR_LIT>' , '<STR_LIT:t>' , '<STR_LIT>' ) ] <EOL> def initialize_options ( self ) : <EOL> self . test = '<STR_LIT:*>' <EOL> def finalize_options ( self ) : <EOL> pass <EOL> def run ( self ) : <EOL> try : <EOL> import coverage <EOL> cov = coverage . coverage ( ) <EOL> cov . start ( ) <EOL> except ImportError : <EOL> cov = None <EOL> suite = unittest . TestSuite ( ) <EOL> if self . test == '<STR_LIT:*>' : <EOL> print ( '<STR_LIT>' ) <EOL> tests = stomp . test . __all__ <EOL> else : <EOL> tests = self . test . split ( '<STR_LIT:U+002C>' ) <EOL> import stomp . test <EOL> for tst in tests : <EOL> suite . addTests ( unittest . TestLoader ( ) . loadTestsFromName ( '<STR_LIT>' % tst ) ) <EOL> runner = unittest . TextTestRunner ( verbosity = <NUM_LIT:2> ) <EOL> res = runner . run ( suite ) <EOL> if len ( res . errors ) > <NUM_LIT:0> or len ( res . failures ) > <NUM_LIT:0> : <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> if cov : <EOL> cov . stop ( ) <EOL> cov . save ( ) <EOL> cov . html_report ( directory = '<STR_LIT>' ) <EOL> class TestPipInstallCommand ( Command ) : <EOL> user_options = [ ] <EOL> def initialize_options ( self ) : <EOL> pass <EOL> def finalize_options ( self ) : <EOL> pass <EOL> def run ( self ) : <EOL> if os . path . exists ( '<STR_LIT>' ) : <EOL> shutil . rmtree ( '<STR_LIT>' ) <EOL> os . mkdir ( '<STR_LIT>' ) <EOL> from virtualenvapi . manage import VirtualEnvironment <EOL> env = VirtualEnvironment ( '<STR_LIT>' ) <EOL> env . install ( '<STR_LIT>' ) <EOL> class DoxygenCommand ( Command ) : <EOL> user_options = [ ] <EOL> def initialize_options ( self ) : <EOL> pass <EOL> def finalize_options ( self ) : <EOL> pass <EOL> def run ( self ) : <EOL> os . system ( '<STR_LIT>' ) <EOL> def version ( ) : <EOL> s = [ ] <EOL> for num in stomp . __version__ : <EOL> s . append ( str ( num ) ) <EOL> return '<STR_LIT:.>' . join ( s ) <EOL> setup ( <EOL> name = '<STR_LIT>' , <EOL> version = version ( ) , <EOL> description = '<STR_LIT>' , <EOL> license = '<STR_LIT>' , <EOL> url = '<STR_LIT>' , <EOL> author = '<STR_LIT>' , <EOL> author_email = '<STR_LIT>' , <EOL> platforms = [ '<STR_LIT>' ] , <EOL> packages = [ '<STR_LIT>' , '<STR_LIT>' ] , <EOL> cmdclass = { '<STR_LIT:test>' : TestCommand , '<STR_LIT>' : DoxygenCommand , '<STR_LIT>' : TestPipInstallCommand } , <EOL> scripts = [ '<STR_LIT>' ] , <EOL> classifiers = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ] <EOL> ) </s>
