Module ImportFrom alias alias alias alias alias alias alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore TupleLoad Str Str Str body Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call NameLoad For NameStore Call AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad NameLoad NameLoad body Continue If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body For NameStore Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore GeneratorExp Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str FunctionDef arguments args defaults body Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Index NameLoad For NameStore Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Yield NameLoad decorator_list Return Call AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A __future__ absolute_import division generators nested_scopes print_function unicode_literals with_statement N/A os itertools chain pants.base.build_environment get_buildroot pants.util.dirutil safe_mkdir pants.contrib.go.targets.go_target GoTarget pants.contrib.go.tasks.go_task GoTask GoWorkspaceTask N/A GoTask N/A N/A Sets up a standard Go workspace and links Go source code to the workspace.

  Enables the use of Go tools which require a $GOPATH and correctly organized
  "src/", "pkg/", and "bin/" directories (e.g. `go install` or `go test`).

  Intended as a super class for tasks which require and maintain a Go workspace.
   prepare N/A N/A cls options round_manager N/A N/A N/A N/A N/A N/A super GoWorkspaceTask cls prepare options round_manager N/A N/A N/A round_manager require_data go_remote_lib_src N/A classmethod get_gopath N/A N/A self target N/A N/A N/A Returns the $GOPATH for the given target. N/A N/A N/A N/A os path join N/A self workdir N/A target id N/A ensure_workspace N/A N/A self target N/A N/A N/A Ensures that an up-to-date Go workspace exists for the given target.

    Creates any necessary symlinks to source files based on the target and its transitive
    dependencies, and removes any symlinks which do not correspond to any needed dep.
     N/A gopath N/A N/A self get_gopath target N/A d N/A bin pkg src N/A N/A N/A safe_mkdir N/A N/A N/A os path join gopath d N/A required_links N/A set N/A dep N/A N/A target closure N/A N/A N/A N/A isinstance dep GoTarget N/A N/A N/A N/A N/A self is_remote_lib dep N/A N/A N/A N/A self _symlink_remote_lib gopath dep required_links N/A N/A N/A N/A self _symlink_local_src gopath dep required_links N/A N/A N/A self remove_unused_links N/A N/A N/A os path join gopath src required_links N/A remove_unused_links N/A N/A dirpath required_links N/A N/A N/A Recursively remove any links in dirpath which are not contained in required_links.

    :param str dirpath: Absolute path of directory to search.
    :param container required_links: Container of "in use" links which should not be removed,
                                     where each link is an absolute path.
     N/A N/A root dirs files N/A N/A os walk dirpath N/A N/A p N/A chain dirs files N/A N/A p N/A N/A N/A os path join root p N/A N/A N/A N/A N/A os path islink p N/A p required_links N/A N/A N/A N/A os unlink p N/A staticmethod _symlink_local_src N/A N/A self gopath go_local_src required_links N/A N/A N/A Creates symlinks from the given gopath to the source files of the given local package.

    Also duplicates directory structure leading to source files of package within
    gopath, in order to provide isolation to the package.

    Adds the symlinks to the source files to required_links.
     N/A source_iter N/A N/A N/A N/A os path join N/A get_buildroot src N/A src N/A N/A go_local_src sources_relative_to_buildroot N/A N/A N/A self _symlink_lib gopath go_local_src source_iter required_links N/A _symlink_remote_lib N/A N/A self gopath go_remote_lib required_links N/A N/A N/A Creates symlinks from the given gopath to the source files of the given remote lib.

    Also duplicates directory structure leading to source files of package within
    gopath, in order to provide isolation to the package.

    Adds the symlinks to the source files to required_links.
     source_iter N/A N/A N/A N/A N/A remote_lib_source_dir N/A N/A N/A N/A N/A self context products get_data go_remote_lib_src N/A go_remote_lib N/A path N/A N/A os listdir remote_lib_source_dir N/A N/A remote_src N/A N/A N/A os path join remote_lib_source_dir path N/A N/A N/A N/A os path isfile remote_src N/A N/A N/A remote_src N/A N/A N/A N/A self _symlink_lib gopath go_remote_lib N/A source_iter required_links N/A _symlink_lib N/A N/A self gopath lib source_iter required_links N/A N/A N/A src_dir N/A N/A N/A os path join gopath src N/A lib import_path N/A N/A safe_mkdir src_dir N/A path source_iter N/A N/A src_link N/A N/A N/A os path join src_dir N/A N/A N/A os path basename path N/A N/A N/A N/A N/A os path islink src_link N/A N/A N/A N/A os symlink path src_link N/A N/A N/A required_links add src_link N/A N/A