proxygen
shell_builder Namespace Reference

Classes

class  ShellFBCodeBuilder
 

Functions

def find_project_root ()
 
def persistent_temp_dir (repo_root)
 

Variables

 repo_root = find_project_root()
 
 temp = persistent_temp_dir(repo_root)
 
 config = read_fbcode_builder_config('fbcode_builder_config.py')
 
 builder = ShellFBCodeBuilder()
 
 make_steps = build_fbcode_builder_config(config)
 
 steps = make_steps(builder)
 

Function Documentation

def shell_builder.find_project_root ( )

Definition at line 78 of file shell_builder.py.

Referenced by shell_builder.ShellFBCodeBuilder.copy_local_repo().

79  here = os.path.dirname(os.path.realpath(__file__))
80  maybe_root = os.path.dirname(os.path.dirname(here))
81  if os.path.isdir(os.path.join(maybe_root, '.git')):
82  return maybe_root
83  raise RuntimeError(
84  "I expected shell_builder.py to be in the "
85  "build/fbcode_builder subdir of a git repo")
86 
87 
def find_project_root()
def shell_builder.persistent_temp_dir (   repo_root)

Definition at line 88 of file shell_builder.py.

References replace().

Referenced by shell_builder.ShellFBCodeBuilder.copy_local_repo().

88 def persistent_temp_dir(repo_root):
89  escaped = repo_root.replace('/', 'sZs').replace('\\', 'sZs').replace(':', '')
90  return os.path.join(os.path.expandvars("$HOME"), '.fbcode_builder-' + escaped)
91 
92 
void BENCHFUN() replace(size_t iters, size_t arg)
def persistent_temp_dir(repo_root)

Variable Documentation

shell_builder.builder = ShellFBCodeBuilder()
shell_builder.config = read_fbcode_builder_config('fbcode_builder_config.py')

Definition at line 98 of file shell_builder.py.

shell_builder.make_steps = build_fbcode_builder_config(config)

Definition at line 110 of file shell_builder.py.

Referenced by shell_builder.ShellFBCodeBuilder.copy_local_repo().

shell_builder.repo_root = find_project_root()

Definition at line 95 of file shell_builder.py.