#NEWLINE# @ classmethod #NEWLINE# def from_package( cls , parse_context , pkg = '' , rev = '' , **kwargs ) : #NEWLINE# #INDENT# "\n    :param string pkg: The package import paths within the remote library; by default just the\n                       root package will be available (equivalent to passing `pkg=''`).\n    :param string rev: Identifies which version of the remote library to download. This could be a\n                       commit SHA (git), node id (hg), etc.  If left unspecified the version will\n                       default to the latest available.  It's highly recommended to not accept the\n                       default and instead pin the rev explicitly for repeatable builds.\n    " #NEWLINE# if ( 'name' in kwargs ) : #NEWLINE# #INDENT# raise TargetDefinitionException ( Address ( parse_context . rel_path , kwargs [ 'name' ] ) , 'A go_remote_library does not accept a name; instead, the name is taken from the `pkg` or the BUILD file location if no package is specified.' ) #NEWLINE# #UNINDENT# name = ( pkg or os . path . basename ( parse_context . rel_path ) ) #NEWLINE# if ( 'dependencies' in kwargs ) : #NEWLINE# #INDENT# raise TargetDefinitionException ( Address ( parse_context . rel_path , name ) , "A go_remote_library does not accept dependencies; instead, they are discovered and when they are on foreign remote libraries the versions are taken from other go_remote_library targets you've defined in the same source root." ) #NEWLINE# #UNINDENT# parse_context . create_object ( cls , type_alias = 'go_remote_library' , name = name , pkg = pkg , rev = rev , ** kwargs )