<s> from __future__ import ( absolute_import , division , generators , nested_scopes , print_function , <EOL> unicode_literals , with_statement ) <EOL> from pants . base . payload import Payload <EOL> from pants . build_graph . target import Target <EOL> from pants . contrib . go . targets . go_local_source import GoLocalSource <EOL> from pants . contrib . go . targets . go_target import GoTarget <EOL> class GoThriftLibrary ( Target ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , <EOL> address = None , <EOL> payload = None , <EOL> import_path = None , <EOL> sources = None , <EOL> ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> payload = payload or Payload ( ) <EOL> payload . add_fields ( { <EOL> '<STR_LIT>' : self . create_sources_field ( sources , address . spec_path , key_arg = '<STR_LIT>' ) , <EOL> } ) <EOL> super ( GoThriftLibrary , self ) . __init__ ( payload = payload , address = address , ** kwargs ) <EOL> self . add_labels ( '<STR_LIT>' ) <EOL> @ classmethod <EOL> def alias ( cls ) : <EOL> return "<STR_LIT>" <EOL> class GoThriftGenLibrary ( GoTarget ) : <EOL> def __init__ ( self , sources = None , address = None , payload = None , ** kwargs ) : <EOL> payload = payload or Payload ( ) <EOL> payload . add_fields ( { <EOL> '<STR_LIT>' : self . create_sources_field ( sources = sources , <EOL> sources_rel_path = address . spec_path , <EOL> key_arg = '<STR_LIT>' ) , <EOL> } ) <EOL> super ( GoThriftGenLibrary , self ) . __init__ ( address = address , payload = payload , ** kwargs ) <EOL> @ property <EOL> def import_path ( self ) : <EOL> """<STR_LIT>""" <EOL> return GoLocalSource . local_import_path ( self . target_base , self . address ) </s>
