proxygen
shell_builder.ShellFBCodeBuilder Class Reference
Inheritance diagram for shell_builder.ShellFBCodeBuilder:
fbcode_builder.FBCodeBuilder fbcode_builder.FBCodeBuilder fbcode_builder.FBCodeBuilder fbcode_builder.FBCodeBuilder

Public Member Functions

def workdir (self, dir)
 
def run (self, shell_cmd)
 
def step (self, name, actions)
 
def setup (self)
 
def comment (self, comment)
 
def copy_local_repo (self, dir, dest_name)
 
def workdir (self, dir)
 
def run (self, shell_cmd)
 
def step (self, name, actions)
 
def setup (self)
 
def comment (self, comment)
 
def copy_local_repo (self, dir, dest_name)
 
def workdir (self, dir)
 
def run (self, shell_cmd)
 
def step (self, name, actions)
 
def setup (self)
 
def comment (self, comment)
 
def copy_local_repo (self, dir, dest_name)
 
def workdir (self, dir)
 
def run (self, shell_cmd)
 
def step (self, name, actions)
 
def setup (self)
 
def comment (self, comment)
 
def copy_local_repo (self, dir, dest_name)
 
- Public Member Functions inherited from fbcode_builder.FBCodeBuilder
def __init__ (self, kwargs)
 
def __repr__ (self)
 
def option (self, name, default=None)
 
def has_option (self, name)
 
def add_option (self, name, value)
 
def render (self, steps)
 
def build (self, steps)
 
def setup (self)
 
def diagnostics (self)
 
def step (self, name, actions)
 
def run (self, shell_cmd)
 
def workdir (self, dir)
 
def copy_local_repo (self, dir, dest_name)
 
def debian_deps (self)
 
def install_debian_deps (self)
 
def debian_ccache_setup_steps (self)
 
def github_project_workdir (self, project, path)
 
def fb_github_project_workdir (self, project_and_path, github_org='facebook')
 
def parallel_make (self, make_vars=None)
 
def make_and_install (self, make_vars=None)
 
def configure (self, name=None)
 
def autoconf_install (self, name)
 
def cmake_configure (self, name, cmake_path='..')
 
def cmake_install (self, name, cmake_path='..')
 
def fb_github_autoconf_install (self, project_and_path, github_org='facebook')
 
def fb_github_cmake_install (self, project_and_path, cmake_path='..', github_org='facebook')
 
def __init__ (self, kwargs)
 
def __repr__ (self)
 
def option (self, name, default=None)
 
def has_option (self, name)
 
def add_option (self, name, value)
 
def render (self, steps)
 
def build (self, steps)
 
def setup (self)
 
def diagnostics (self)
 
def step (self, name, actions)
 
def run (self, shell_cmd)
 
def workdir (self, dir)
 
def copy_local_repo (self, dir, dest_name)
 
def debian_deps (self)
 
def install_debian_deps (self)
 
def debian_ccache_setup_steps (self)
 
def github_project_workdir (self, project, path)
 
def fb_github_project_workdir (self, project_and_path, github_org='facebook')
 
def parallel_make (self, make_vars=None)
 
def make_and_install (self, make_vars=None)
 
def configure (self, name=None)
 
def autoconf_install (self, name)
 
def cmake_configure (self, name, cmake_path='..')
 
def cmake_install (self, name, cmake_path='..')
 
def fb_github_autoconf_install (self, project_and_path, github_org='facebook')
 
def fb_github_cmake_install (self, project_and_path, cmake_path='..', github_org='facebook')
 
def __init__ (self, kwargs)
 
def __repr__ (self)
 
def option (self, name, default=None)
 
def has_option (self, name)
 
def add_option (self, name, value)
 
def render (self, steps)
 
def build (self, steps)
 
def setup (self)
 
def diagnostics (self)
 
def step (self, name, actions)
 
def run (self, shell_cmd)
 
def workdir (self, dir)
 
def copy_local_repo (self, dir, dest_name)
 
def debian_deps (self)
 
def install_debian_deps (self)
 
def debian_ccache_setup_steps (self)
 
def github_project_workdir (self, project, path)
 
def fb_github_project_workdir (self, project_and_path, github_org='facebook')
 
def parallel_make (self, make_vars=None)
 
def make_and_install (self, make_vars=None)
 
def configure (self, name=None)
 
def autoconf_install (self, name)
 
def cmake_configure (self, name, cmake_path='..')
 
def cmake_install (self, name, cmake_path='..')
 
def fb_github_autoconf_install (self, project_and_path, github_org='facebook')
 
def fb_github_cmake_install (self, project_and_path, cmake_path='..', github_org='facebook')
 
def __init__ (self, kwargs)
 
def __repr__ (self)
 
def option (self, name, default=None)
 
def has_option (self, name)
 
def add_option (self, name, value)
 
def render (self, steps)
 
def build (self, steps)
 
def setup (self)
 
def diagnostics (self)
 
def step (self, name, actions)
 
def run (self, shell_cmd)
 
def workdir (self, dir)
 
def copy_local_repo (self, dir, dest_name)
 
def debian_deps (self)
 
def install_debian_deps (self)
 
def debian_ccache_setup_steps (self)
 
def github_project_workdir (self, project, path)
 
def fb_github_project_workdir (self, project_and_path, github_org='facebook')
 
def parallel_make (self, make_vars=None)
 
def make_and_install (self, make_vars=None)
 
def configure (self, name=None)
 
def autoconf_install (self, name)
 
def cmake_configure (self, name, cmake_path='..')
 
def cmake_install (self, name, cmake_path='..')
 
def fb_github_autoconf_install (self, project_and_path, github_org='facebook')
 
def fb_github_cmake_install (self, project_and_path, cmake_path='..', github_org='facebook')
 

Private Member Functions

def _render_impl (self, steps)
 
def _render_impl (self, steps)
 
def _render_impl (self, steps)
 
def _render_impl (self, steps)
 

Additional Inherited Members

- Public Attributes inherited from fbcode_builder.FBCodeBuilder
 options_used
 

Detailed Description

Definition at line 32 of file shell_builder.py.

Member Function Documentation

def shell_builder.ShellFBCodeBuilder._render_impl (   self,
  steps 
)
private
def shell_builder.ShellFBCodeBuilder._render_impl (   self,
  steps 
)
private
def shell_builder.ShellFBCodeBuilder._render_impl (   self,
  steps 
)
private
def shell_builder.ShellFBCodeBuilder._render_impl (   self,
  steps 
)
private
def shell_builder.ShellFBCodeBuilder.comment (   self,
  comment 
)

Definition at line 66 of file shell_builder.py.

References shell_builder.ShellFBCodeBuilder.comment(), and shell_quoting.shell_comment().

Referenced by fbcode_builder.FBCodeBuilder.diagnostics().

66  def comment(self, comment):
67  return shell_comment(comment)
68 
def shell_comment(c)
def shell_builder.ShellFBCodeBuilder.comment (   self,
  comment 
)

Definition at line 66 of file shell_builder.py.

References shell_builder.ShellFBCodeBuilder.comment(), and shell_quoting.shell_comment().

Referenced by fbcode_builder.FBCodeBuilder.diagnostics().

66  def comment(self, comment):
67  return shell_comment(comment)
68 
def shell_comment(c)
def shell_builder.ShellFBCodeBuilder.comment (   self,
  comment 
)

Definition at line 66 of file shell_builder.py.

References shell_builder.ShellFBCodeBuilder.comment(), and shell_quoting.shell_comment().

Referenced by fbcode_builder.FBCodeBuilder.diagnostics().

66  def comment(self, comment):
67  return shell_comment(comment)
68 
def shell_comment(c)
def shell_builder.ShellFBCodeBuilder.comment (   self,
  comment 
)

Definition at line 66 of file shell_builder.py.

References shell_quoting.shell_comment().

Referenced by shell_builder.ShellFBCodeBuilder.comment(), and fbcode_builder.FBCodeBuilder.diagnostics().

66  def comment(self, comment):
67  return shell_comment(comment)
68 
def shell_comment(c)
def shell_builder.ShellFBCodeBuilder.copy_local_repo (   self,
  dir,
  dest_name 
)

Definition at line 69 of file shell_builder.py.

References utils.build_fbcode_builder_config(), shell_builder.ShellFBCodeBuilder.copy_local_repo(), shell_builder.find_project_root(), folly.format(), shell_builder.make_steps, shell_builder.persistent_temp_dir(), utils.read_fbcode_builder_config(), and replace().

69  def copy_local_repo(self, dir, dest_name):
70  return [
71  ShellQuoted('cp -r {dir} {dest_name}').format(
72  dir=dir,
73  dest_name=dest_name
74  ),
75  ]
76 
77 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def copy_local_repo(self, dir, dest_name)
def shell_builder.ShellFBCodeBuilder.copy_local_repo (   self,
  dir,
  dest_name 
)

Definition at line 69 of file shell_builder.py.

References utils.build_fbcode_builder_config(), shell_builder.ShellFBCodeBuilder.copy_local_repo(), shell_builder.find_project_root(), folly.format(), shell_builder.make_steps, shell_builder.persistent_temp_dir(), utils.read_fbcode_builder_config(), and replace().

69  def copy_local_repo(self, dir, dest_name):
70  return [
71  ShellQuoted('cp -r {dir} {dest_name}').format(
72  dir=dir,
73  dest_name=dest_name
74  ),
75  ]
76 
77 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def copy_local_repo(self, dir, dest_name)
def shell_builder.ShellFBCodeBuilder.copy_local_repo (   self,
  dir,
  dest_name 
)

Definition at line 69 of file shell_builder.py.

References utils.build_fbcode_builder_config(), shell_builder.ShellFBCodeBuilder.copy_local_repo(), shell_builder.find_project_root(), folly.format(), shell_builder.make_steps, shell_builder.persistent_temp_dir(), utils.read_fbcode_builder_config(), and replace().

69  def copy_local_repo(self, dir, dest_name):
70  return [
71  ShellQuoted('cp -r {dir} {dest_name}').format(
72  dir=dir,
73  dest_name=dest_name
74  ),
75  ]
76 
77 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def copy_local_repo(self, dir, dest_name)
def shell_builder.ShellFBCodeBuilder.copy_local_repo (   self,
  dir,
  dest_name 
)

Definition at line 69 of file shell_builder.py.

References folly.format().

Referenced by shell_builder.ShellFBCodeBuilder.copy_local_repo().

69  def copy_local_repo(self, dir, dest_name):
70  return [
71  ShellQuoted('cp -r {dir} {dest_name}').format(
72  dir=dir,
73  dest_name=dest_name
74  ),
75  ]
76 
77 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def copy_local_repo(self, dir, dest_name)
def shell_builder.ShellFBCodeBuilder.run (   self,
  shell_cmd 
)

Definition at line 43 of file shell_builder.py.

References folly.format(), and shell_builder.ShellFBCodeBuilder.run().

43  def run(self, shell_cmd):
44  return ShellQuoted('{cmd}').format(cmd=shell_cmd)
45 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_builder.ShellFBCodeBuilder.run (   self,
  shell_cmd 
)

Definition at line 43 of file shell_builder.py.

References folly.format(), and shell_builder.ShellFBCodeBuilder.run().

43  def run(self, shell_cmd):
44  return ShellQuoted('{cmd}').format(cmd=shell_cmd)
45 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_builder.ShellFBCodeBuilder.run (   self,
  shell_cmd 
)

Definition at line 43 of file shell_builder.py.

References folly.format().

Referenced by shell_builder.ShellFBCodeBuilder.run().

43  def run(self, shell_cmd):
44  return ShellQuoted('{cmd}').format(cmd=shell_cmd)
45 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_builder.ShellFBCodeBuilder.run (   self,
  shell_cmd 
)

Definition at line 43 of file shell_builder.py.

References folly.format(), and shell_builder.ShellFBCodeBuilder.run().

43  def run(self, shell_cmd):
44  return ShellQuoted('{cmd}').format(cmd=shell_cmd)
45 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_builder.ShellFBCodeBuilder.setup (   self)

Definition at line 51 of file shell_builder.py.

References folly.format(), fbcode_builder.FBCodeBuilder.has_option(), and fbcode_builder.FBCodeBuilder.option().

Referenced by shell_builder.ShellFBCodeBuilder.setup().

51  def setup(self):
52  steps = [
53  ShellQuoted('set -exo pipefail'),
54  ]
55  if self.has_option('ccache_dir'):
56  ccache_dir = self.option('ccache_dir')
57  steps += [
58  ShellQuoted(
59  # Set CCACHE_DIR before the `ccache` invocations below.
60  'export CCACHE_DIR={ccache_dir} '
61  'CC="ccache ${{CC:-gcc}}" CXX="ccache ${{CXX:-g++}}"'
62  ).format(ccache_dir=ccache_dir)
63  ]
64  return steps
65 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def shell_builder.ShellFBCodeBuilder.setup (   self)

Definition at line 51 of file shell_builder.py.

References folly.format(), fbcode_builder.FBCodeBuilder.has_option(), fbcode_builder.FBCodeBuilder.option(), and shell_builder.ShellFBCodeBuilder.setup().

51  def setup(self):
52  steps = [
53  ShellQuoted('set -exo pipefail'),
54  ]
55  if self.has_option('ccache_dir'):
56  ccache_dir = self.option('ccache_dir')
57  steps += [
58  ShellQuoted(
59  # Set CCACHE_DIR before the `ccache` invocations below.
60  'export CCACHE_DIR={ccache_dir} '
61  'CC="ccache ${{CC:-gcc}}" CXX="ccache ${{CXX:-g++}}"'
62  ).format(ccache_dir=ccache_dir)
63  ]
64  return steps
65 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def shell_builder.ShellFBCodeBuilder.setup (   self)

Definition at line 51 of file shell_builder.py.

References folly.format(), fbcode_builder.FBCodeBuilder.has_option(), fbcode_builder.FBCodeBuilder.option(), and shell_builder.ShellFBCodeBuilder.setup().

51  def setup(self):
52  steps = [
53  ShellQuoted('set -exo pipefail'),
54  ]
55  if self.has_option('ccache_dir'):
56  ccache_dir = self.option('ccache_dir')
57  steps += [
58  ShellQuoted(
59  # Set CCACHE_DIR before the `ccache` invocations below.
60  'export CCACHE_DIR={ccache_dir} '
61  'CC="ccache ${{CC:-gcc}}" CXX="ccache ${{CXX:-g++}}"'
62  ).format(ccache_dir=ccache_dir)
63  ]
64  return steps
65 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def shell_builder.ShellFBCodeBuilder.setup (   self)

Definition at line 51 of file shell_builder.py.

References folly.format(), fbcode_builder.FBCodeBuilder.has_option(), fbcode_builder.FBCodeBuilder.option(), and shell_builder.ShellFBCodeBuilder.setup().

51  def setup(self):
52  steps = [
53  ShellQuoted('set -exo pipefail'),
54  ]
55  if self.has_option('ccache_dir'):
56  ccache_dir = self.option('ccache_dir')
57  steps += [
58  ShellQuoted(
59  # Set CCACHE_DIR before the `ccache` invocations below.
60  'export CCACHE_DIR={ccache_dir} '
61  'CC="ccache ${{CC:-gcc}}" CXX="ccache ${{CXX:-g++}}"'
62  ).format(ccache_dir=ccache_dir)
63  ]
64  return steps
65 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def shell_builder.ShellFBCodeBuilder.step (   self,
  name,
  actions 
)

Definition at line 46 of file shell_builder.py.

References folly.format().

Referenced by shell_builder.ShellFBCodeBuilder.step().

46  def step(self, name, actions):
47  assert '\n' not in name, 'Name {0} would span > 1 line'.format(name)
48  b = ShellQuoted('')
49  return [ShellQuoted('### {0} ###'.format(name)), b] + actions + [b]
50 
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_builder.ShellFBCodeBuilder.step (   self,
  name,
  actions 
)

Definition at line 46 of file shell_builder.py.

References folly.format(), and shell_builder.ShellFBCodeBuilder.step().

46  def step(self, name, actions):
47  assert '\n' not in name, 'Name {0} would span > 1 line'.format(name)
48  b = ShellQuoted('')
49  return [ShellQuoted('### {0} ###'.format(name)), b] + actions + [b]
50 
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_builder.ShellFBCodeBuilder.step (   self,
  name,
  actions 
)

Definition at line 46 of file shell_builder.py.

References folly.format(), and shell_builder.ShellFBCodeBuilder.step().

46  def step(self, name, actions):
47  assert '\n' not in name, 'Name {0} would span > 1 line'.format(name)
48  b = ShellQuoted('')
49  return [ShellQuoted('### {0} ###'.format(name)), b] + actions + [b]
50 
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_builder.ShellFBCodeBuilder.step (   self,
  name,
  actions 
)

Definition at line 46 of file shell_builder.py.

References folly.format(), and shell_builder.ShellFBCodeBuilder.step().

46  def step(self, name, actions):
47  assert '\n' not in name, 'Name {0} would span > 1 line'.format(name)
48  b = ShellQuoted('')
49  return [ShellQuoted('### {0} ###'.format(name)), b] + actions + [b]
50 
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_builder.ShellFBCodeBuilder.workdir (   self,
  dir 
)

Definition at line 36 of file shell_builder.py.

References folly.format(), and shell_builder.ShellFBCodeBuilder.workdir().

36  def workdir(self, dir):
37  return [
38  ShellQuoted('mkdir -p {d} && cd {d}').format(
39  d=dir
40  ),
41  ]
42 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_builder.ShellFBCodeBuilder.workdir (   self,
  dir 
)

Definition at line 36 of file shell_builder.py.

References folly.format(), and shell_builder.ShellFBCodeBuilder.workdir().

36  def workdir(self, dir):
37  return [
38  ShellQuoted('mkdir -p {d} && cd {d}').format(
39  d=dir
40  ),
41  ]
42 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_builder.ShellFBCodeBuilder.workdir (   self,
  dir 
)

Definition at line 36 of file shell_builder.py.

References folly.format(), and shell_builder.ShellFBCodeBuilder.workdir().

36  def workdir(self, dir):
37  return [
38  ShellQuoted('mkdir -p {d} && cd {d}').format(
39  d=dir
40  ),
41  ]
42 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_builder.ShellFBCodeBuilder.workdir (   self,
  dir 
)

Definition at line 36 of file shell_builder.py.

References folly.format().

Referenced by shell_builder.ShellFBCodeBuilder.workdir().

36  def workdir(self, dir):
37  return [
38  ShellQuoted('mkdir -p {d} && cd {d}').format(
39  d=dir
40  ),
41  ]
42 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271

The documentation for this class was generated from the following file: