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

Public Member Functions

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')
 

Public Attributes

 options_used
 

Private Member Functions

def _make_vars (self, make_vars)
 
def _make_vars (self, make_vars)
 
def _make_vars (self, make_vars)
 
def _make_vars (self, make_vars)
 

Private Attributes

 _options_do_not_access
 
 _github_hashes
 

Detailed Description

Definition at line 83 of file fbcode_builder.py.

Constructor & Destructor Documentation

def fbcode_builder.FBCodeBuilder.__init__ (   self,
  kwargs 
)

Definition at line 85 of file fbcode_builder.py.

Referenced by fbcode_builder.FBCodeBuilder.__init__().

85  def __init__(self, **kwargs):
86  self._options_do_not_access = kwargs # Use .option() instead.
87  # This raises upon detecting options that are specified but unused,
88  # because otherwise it is very easy to make a typo in option names.
89  self.options_used = set()
91 
def __init__(self, kwargs)
def _read_project_github_hashes()
Definition: Traits.h:592
def fbcode_builder.FBCodeBuilder.__init__ (   self,
  kwargs 
)

Definition at line 85 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.__init__(), fbcode_builder.FBCodeBuilder._github_hashes, fbcode_builder.FBCodeBuilder._options_do_not_access, fbcode_builder._read_project_github_hashes(), and fbcode_builder.FBCodeBuilder.options_used.

85  def __init__(self, **kwargs):
86  self._options_do_not_access = kwargs # Use .option() instead.
87  # This raises upon detecting options that are specified but unused,
88  # because otherwise it is very easy to make a typo in option names.
89  self.options_used = set()
91 
def __init__(self, kwargs)
def _read_project_github_hashes()
Definition: Traits.h:592
def fbcode_builder.FBCodeBuilder.__init__ (   self,
  kwargs 
)

Definition at line 85 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.__init__(), fbcode_builder.FBCodeBuilder._github_hashes, fbcode_builder.FBCodeBuilder._options_do_not_access, fbcode_builder._read_project_github_hashes(), and fbcode_builder.FBCodeBuilder.options_used.

85  def __init__(self, **kwargs):
86  self._options_do_not_access = kwargs # Use .option() instead.
87  # This raises upon detecting options that are specified but unused,
88  # because otherwise it is very easy to make a typo in option names.
89  self.options_used = set()
91 
def __init__(self, kwargs)
def _read_project_github_hashes()
Definition: Traits.h:592
def fbcode_builder.FBCodeBuilder.__init__ (   self,
  kwargs 
)

Definition at line 85 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.__init__(), fbcode_builder.FBCodeBuilder._github_hashes, fbcode_builder.FBCodeBuilder._options_do_not_access, fbcode_builder._read_project_github_hashes(), and fbcode_builder.FBCodeBuilder.options_used.

85  def __init__(self, **kwargs):
86  self._options_do_not_access = kwargs # Use .option() instead.
87  # This raises upon detecting options that are specified but unused,
88  # because otherwise it is very easy to make a typo in option names.
89  self.options_used = set()
91 
def __init__(self, kwargs)
def _read_project_github_hashes()
Definition: Traits.h:592

Member Function Documentation

def fbcode_builder.FBCodeBuilder.__repr__ (   self)

Definition at line 92 of file fbcode_builder.py.

References folly.format(), and join.

Referenced by fbcode_builder.FBCodeBuilder.__repr__().

92  def __repr__(self):
93  return '{0}({1})'.format(
94  self.__class__.__name__,
95  ', '.join(
96  '{0}={1}'.format(k, repr(v))
97  for k, v in self._options_do_not_access.items()
98  )
99  )
100 
#define join
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def fbcode_builder.FBCodeBuilder.__repr__ (   self)

Definition at line 92 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.__repr__(), folly.format(), and join.

92  def __repr__(self):
93  return '{0}({1})'.format(
94  self.__class__.__name__,
95  ', '.join(
96  '{0}={1}'.format(k, repr(v))
97  for k, v in self._options_do_not_access.items()
98  )
99  )
100 
#define join
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def fbcode_builder.FBCodeBuilder.__repr__ (   self)

Definition at line 92 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.__repr__(), folly.format(), and join.

92  def __repr__(self):
93  return '{0}({1})'.format(
94  self.__class__.__name__,
95  ', '.join(
96  '{0}={1}'.format(k, repr(v))
97  for k, v in self._options_do_not_access.items()
98  )
99  )
100 
#define join
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def fbcode_builder.FBCodeBuilder.__repr__ (   self)

Definition at line 92 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.__repr__(), folly.format(), and join.

92  def __repr__(self):
93  return '{0}({1})'.format(
94  self.__class__.__name__,
95  ', '.join(
96  '{0}={1}'.format(k, repr(v))
97  for k, v in self._options_do_not_access.items()
98  )
99  )
100 
#define join
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def fbcode_builder.FBCodeBuilder._make_vars (   self,
  make_vars 
)
private

Definition at line 283 of file fbcode_builder.py.

References folly.format(), and shell_quoting.shell_join().

Referenced by fbcode_builder.FBCodeBuilder._make_vars(), fbcode_builder.FBCodeBuilder.make_and_install(), and fbcode_builder.FBCodeBuilder.parallel_make().

283  def _make_vars(self, make_vars):
284  return shell_join(' ', (
285  ShellQuoted('{k}={v}').format(k=k, v=v)
286  for k, v in ({} if make_vars is None else make_vars).items()
287  ))
288 
def _make_vars(self, make_vars)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder._make_vars (   self,
  make_vars 
)
private

Definition at line 283 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._make_vars(), folly.format(), and shell_quoting.shell_join().

283  def _make_vars(self, make_vars):
284  return shell_join(' ', (
285  ShellQuoted('{k}={v}').format(k=k, v=v)
286  for k, v in ({} if make_vars is None else make_vars).items()
287  ))
288 
def _make_vars(self, make_vars)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder._make_vars (   self,
  make_vars 
)
private

Definition at line 283 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._make_vars(), folly.format(), and shell_quoting.shell_join().

283  def _make_vars(self, make_vars):
284  return shell_join(' ', (
285  ShellQuoted('{k}={v}').format(k=k, v=v)
286  for k, v in ({} if make_vars is None else make_vars).items()
287  ))
288 
def _make_vars(self, make_vars)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder._make_vars (   self,
  make_vars 
)
private

Definition at line 283 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._make_vars(), folly.format(), and shell_quoting.shell_join().

283  def _make_vars(self, make_vars):
284  return shell_join(' ', (
285  ShellQuoted('{k}={v}').format(k=k, v=v)
286  for k, v in ({} if make_vars is None else make_vars).items()
287  ))
288 
def _make_vars(self, make_vars)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder.add_option (   self,
  name,
  value 
)

Definition at line 111 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._options_do_not_access, and folly.format().

Referenced by fbcode_builder.FBCodeBuilder.add_option().

111  def add_option(self, name, value):
112  if name in self._options_do_not_access:
113  raise RuntimeError('Option {0} already set'.format(name))
114  self._options_do_not_access[name] = value
115 
def add_option(self, name, value)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def fbcode_builder.FBCodeBuilder.add_option (   self,
  name,
  value 
)

Definition at line 111 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._options_do_not_access, fbcode_builder.FBCodeBuilder.add_option(), and folly.format().

111  def add_option(self, name, value):
112  if name in self._options_do_not_access:
113  raise RuntimeError('Option {0} already set'.format(name))
114  self._options_do_not_access[name] = value
115 
def add_option(self, name, value)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def fbcode_builder.FBCodeBuilder.add_option (   self,
  name,
  value 
)

Definition at line 111 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._options_do_not_access, fbcode_builder.FBCodeBuilder.add_option(), and folly.format().

111  def add_option(self, name, value):
112  if name in self._options_do_not_access:
113  raise RuntimeError('Option {0} already set'.format(name))
114  self._options_do_not_access[name] = value
115 
def add_option(self, name, value)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def fbcode_builder.FBCodeBuilder.add_option (   self,
  name,
  value 
)

Definition at line 111 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._options_do_not_access, fbcode_builder.FBCodeBuilder.add_option(), and folly.format().

111  def add_option(self, name, value):
112  if name in self._options_do_not_access:
113  raise RuntimeError('Option {0} already set'.format(name))
114  self._options_do_not_access[name] = value
115 
def add_option(self, name, value)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def fbcode_builder.FBCodeBuilder.autoconf_install (   self,
  name 
)

Definition at line 325 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.autoconf_install(), fbcode_builder.FBCodeBuilder.configure(), folly.format(), fbcode_builder.FBCodeBuilder.make_and_install(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

325  def autoconf_install(self, name):
326  return self.step('Build and install {0}'.format(name), [
327  self.run(ShellQuoted('autoreconf -ivf')),
328  ] + self.configure() + self.make_and_install())
329 
def run(self, shell_cmd)
def configure(self, name=None)
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def autoconf_install(self, name)
def make_and_install(self, make_vars=None)
def fbcode_builder.FBCodeBuilder.autoconf_install (   self,
  name 
)
def fbcode_builder.FBCodeBuilder.autoconf_install (   self,
  name 
)

Definition at line 325 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.autoconf_install(), fbcode_builder.FBCodeBuilder.configure(), folly.format(), fbcode_builder.FBCodeBuilder.make_and_install(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

325  def autoconf_install(self, name):
326  return self.step('Build and install {0}'.format(name), [
327  self.run(ShellQuoted('autoreconf -ivf')),
328  ] + self.configure() + self.make_and_install())
329 
def run(self, shell_cmd)
def configure(self, name=None)
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def autoconf_install(self, name)
def make_and_install(self, make_vars=None)
def fbcode_builder.FBCodeBuilder.autoconf_install (   self,
  name 
)

Definition at line 325 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.autoconf_install(), fbcode_builder.FBCodeBuilder.configure(), folly.format(), fbcode_builder.FBCodeBuilder.make_and_install(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

325  def autoconf_install(self, name):
326  return self.step('Build and install {0}'.format(name), [
327  self.run(ShellQuoted('autoreconf -ivf')),
328  ] + self.configure() + self.make_and_install())
329 
def run(self, shell_cmd)
def configure(self, name=None)
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def autoconf_install(self, name)
def make_and_install(self, make_vars=None)
def fbcode_builder.FBCodeBuilder.build (   self,
  steps 
)

Definition at line 141 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.build(), fbcode_builder.FBCodeBuilder.diagnostics(), docker_builder.DockerFBCodeBuilder.setup(), and fbcode_builder.FBCodeBuilder.setup().

141  def build(self, steps):
142  if not steps:
143  raise RuntimeError('Please ensure that the config you are passing '
144  'contains steps')
145  return [self.setup(), self.diagnostics()] + steps
146 
def fbcode_builder.FBCodeBuilder.build (   self,
  steps 
)

Definition at line 141 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.build(), fbcode_builder.FBCodeBuilder.diagnostics(), docker_builder.DockerFBCodeBuilder.setup(), and fbcode_builder.FBCodeBuilder.setup().

141  def build(self, steps):
142  if not steps:
143  raise RuntimeError('Please ensure that the config you are passing '
144  'contains steps')
145  return [self.setup(), self.diagnostics()] + steps
146 
def fbcode_builder.FBCodeBuilder.build (   self,
  steps 
)

Definition at line 141 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.diagnostics(), docker_builder.DockerFBCodeBuilder.setup(), and fbcode_builder.FBCodeBuilder.setup().

Referenced by fbcode_builder.FBCodeBuilder.build().

141  def build(self, steps):
142  if not steps:
143  raise RuntimeError('Please ensure that the config you are passing '
144  'contains steps')
145  return [self.setup(), self.diagnostics()] + steps
146 
def fbcode_builder.FBCodeBuilder.build (   self,
  steps 
)

Definition at line 141 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.build(), fbcode_builder.FBCodeBuilder.diagnostics(), docker_builder.DockerFBCodeBuilder.setup(), and fbcode_builder.FBCodeBuilder.setup().

141  def build(self, steps):
142  if not steps:
143  raise RuntimeError('Please ensure that the config you are passing '
144  'contains steps')
145  return [self.setup(), self.diagnostics()] + steps
146 
def fbcode_builder.FBCodeBuilder.cmake_configure (   self,
  name,
  cmake_path = '..' 
)

Definition at line 330 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.cmake_configure(), folly.format(), fbcode_builder.FBCodeBuilder.option(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), and shell_quoting.shell_join().

330  def cmake_configure(self, name, cmake_path='..'):
331  cmake_defines = {
332  'BUILD_SHARED_LIBS': 'ON',
333  'CMAKE_INSTALL_PREFIX': self.option('prefix'),
334  }
335  cmake_defines.update(
336  self.option('{0}:cmake_defines'.format(name), {})
337  )
338  return [
339  self.run(ShellQuoted(
340  'CXXFLAGS="$CXXFLAGS -fPIC -isystem "{p}"/include" '
341  'CFLAGS="$CFLAGS -fPIC -isystem "{p}"/include" '
342  'cmake {args} {cmake_path}'
343  ).format(
344  p=self.option('prefix'),
345  args=shell_join(' ', (
346  ShellQuoted('-D{k}={v}').format(k=k, v=v)
347  for k, v in cmake_defines.items()
348  )),
349  cmake_path=cmake_path,
350  )),
351  ]
352 
def run(self, shell_cmd)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def cmake_configure(self, name, cmake_path='..')
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder.cmake_configure (   self,
  name,
  cmake_path = '..' 
)

Definition at line 330 of file fbcode_builder.py.

References folly.format(), fbcode_builder.FBCodeBuilder.option(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), and shell_quoting.shell_join().

Referenced by fbcode_builder.FBCodeBuilder.cmake_configure(), and fbcode_builder.FBCodeBuilder.cmake_install().

330  def cmake_configure(self, name, cmake_path='..'):
331  cmake_defines = {
332  'BUILD_SHARED_LIBS': 'ON',
333  'CMAKE_INSTALL_PREFIX': self.option('prefix'),
334  }
335  cmake_defines.update(
336  self.option('{0}:cmake_defines'.format(name), {})
337  )
338  return [
339  self.run(ShellQuoted(
340  'CXXFLAGS="$CXXFLAGS -fPIC -isystem "{p}"/include" '
341  'CFLAGS="$CFLAGS -fPIC -isystem "{p}"/include" '
342  'cmake {args} {cmake_path}'
343  ).format(
344  p=self.option('prefix'),
345  args=shell_join(' ', (
346  ShellQuoted('-D{k}={v}').format(k=k, v=v)
347  for k, v in cmake_defines.items()
348  )),
349  cmake_path=cmake_path,
350  )),
351  ]
352 
def run(self, shell_cmd)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def cmake_configure(self, name, cmake_path='..')
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder.cmake_configure (   self,
  name,
  cmake_path = '..' 
)

Definition at line 330 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.cmake_configure(), folly.format(), fbcode_builder.FBCodeBuilder.option(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), and shell_quoting.shell_join().

330  def cmake_configure(self, name, cmake_path='..'):
331  cmake_defines = {
332  'BUILD_SHARED_LIBS': 'ON',
333  'CMAKE_INSTALL_PREFIX': self.option('prefix'),
334  }
335  cmake_defines.update(
336  self.option('{0}:cmake_defines'.format(name), {})
337  )
338  return [
339  self.run(ShellQuoted(
340  'CXXFLAGS="$CXXFLAGS -fPIC -isystem "{p}"/include" '
341  'CFLAGS="$CFLAGS -fPIC -isystem "{p}"/include" '
342  'cmake {args} {cmake_path}'
343  ).format(
344  p=self.option('prefix'),
345  args=shell_join(' ', (
346  ShellQuoted('-D{k}={v}').format(k=k, v=v)
347  for k, v in cmake_defines.items()
348  )),
349  cmake_path=cmake_path,
350  )),
351  ]
352 
def run(self, shell_cmd)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def cmake_configure(self, name, cmake_path='..')
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder.cmake_configure (   self,
  name,
  cmake_path = '..' 
)

Definition at line 330 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.cmake_configure(), folly.format(), fbcode_builder.FBCodeBuilder.option(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), and shell_quoting.shell_join().

330  def cmake_configure(self, name, cmake_path='..'):
331  cmake_defines = {
332  'BUILD_SHARED_LIBS': 'ON',
333  'CMAKE_INSTALL_PREFIX': self.option('prefix'),
334  }
335  cmake_defines.update(
336  self.option('{0}:cmake_defines'.format(name), {})
337  )
338  return [
339  self.run(ShellQuoted(
340  'CXXFLAGS="$CXXFLAGS -fPIC -isystem "{p}"/include" '
341  'CFLAGS="$CFLAGS -fPIC -isystem "{p}"/include" '
342  'cmake {args} {cmake_path}'
343  ).format(
344  p=self.option('prefix'),
345  args=shell_join(' ', (
346  ShellQuoted('-D{k}={v}').format(k=k, v=v)
347  for k, v in cmake_defines.items()
348  )),
349  cmake_path=cmake_path,
350  )),
351  ]
352 
def run(self, shell_cmd)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def cmake_configure(self, name, cmake_path='..')
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder.cmake_install (   self,
  name,
  cmake_path = '..' 
)

Definition at line 353 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.cmake_configure(), fbcode_builder.FBCodeBuilder.cmake_install(), folly.format(), fbcode_builder.FBCodeBuilder.make_and_install(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

353  def cmake_install(self, name, cmake_path='..'):
354  return self.step(
355  'Build and install {0}'.format(name),
356  self.cmake_configure(name, cmake_path) + self.make_and_install()
357  )
358 
def cmake_install(self, name, cmake_path='..')
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def make_and_install(self, make_vars=None)
def cmake_configure(self, name, cmake_path='..')
def fbcode_builder.FBCodeBuilder.cmake_install (   self,
  name,
  cmake_path = '..' 
)

Definition at line 353 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.cmake_configure(), fbcode_builder.FBCodeBuilder.cmake_install(), folly.format(), fbcode_builder.FBCodeBuilder.make_and_install(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

353  def cmake_install(self, name, cmake_path='..'):
354  return self.step(
355  'Build and install {0}'.format(name),
356  self.cmake_configure(name, cmake_path) + self.make_and_install()
357  )
358 
def cmake_install(self, name, cmake_path='..')
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def make_and_install(self, make_vars=None)
def cmake_configure(self, name, cmake_path='..')
def fbcode_builder.FBCodeBuilder.cmake_install (   self,
  name,
  cmake_path = '..' 
)

Definition at line 353 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.cmake_configure(), fbcode_builder.FBCodeBuilder.cmake_install(), folly.format(), fbcode_builder.FBCodeBuilder.make_and_install(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

353  def cmake_install(self, name, cmake_path='..'):
354  return self.step(
355  'Build and install {0}'.format(name),
356  self.cmake_configure(name, cmake_path) + self.make_and_install()
357  )
358 
def cmake_install(self, name, cmake_path='..')
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def make_and_install(self, make_vars=None)
def cmake_configure(self, name, cmake_path='..')
def fbcode_builder.FBCodeBuilder.cmake_install (   self,
  name,
  cmake_path = '..' 
)

Definition at line 353 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.cmake_configure(), folly.format(), fbcode_builder.FBCodeBuilder.make_and_install(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

Referenced by fbcode_builder.FBCodeBuilder.cmake_install(), and fbcode_builder.FBCodeBuilder.fb_github_cmake_install().

353  def cmake_install(self, name, cmake_path='..'):
354  return self.step(
355  'Build and install {0}'.format(name),
356  self.cmake_configure(name, cmake_path) + self.make_and_install()
357  )
358 
def cmake_install(self, name, cmake_path='..')
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def make_and_install(self, make_vars=None)
def cmake_configure(self, name, cmake_path='..')
def fbcode_builder.FBCodeBuilder.configure (   self,
  name = None 
)

Definition at line 303 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.configure(), folly.format(), fbcode_builder.FBCodeBuilder.option(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), and shell_quoting.shell_join().

303  def configure(self, name=None):
304  autoconf_options = {}
305  if name is not None:
306  autoconf_options.update(
307  self.option('{0}:autoconf_options'.format(name), {})
308  )
309  return [
310  self.run(ShellQuoted(
311  'LDFLAGS="$LDFLAGS -L"{p}"/lib -Wl,-rpath="{p}"/lib" '
312  'CFLAGS="$CFLAGS -I"{p}"/include" '
313  'CPPFLAGS="$CPPFLAGS -I"{p}"/include" '
314  'PY_PREFIX={p} '
315  './configure --prefix={p} {args}'
316  ).format(
317  p=self.option('prefix'),
318  args=shell_join(' ', (
319  ShellQuoted('{k}={v}').format(k=k, v=v)
320  for k, v in autoconf_options.items()
321  )),
322  )),
323  ]
324 
def run(self, shell_cmd)
def configure(self, name=None)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder.configure (   self,
  name = None 
)

Definition at line 303 of file fbcode_builder.py.

References folly.format(), fbcode_builder.FBCodeBuilder.option(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), and shell_quoting.shell_join().

Referenced by fbcode_builder.FBCodeBuilder.autoconf_install(), and fbcode_builder.FBCodeBuilder.configure().

303  def configure(self, name=None):
304  autoconf_options = {}
305  if name is not None:
306  autoconf_options.update(
307  self.option('{0}:autoconf_options'.format(name), {})
308  )
309  return [
310  self.run(ShellQuoted(
311  'LDFLAGS="$LDFLAGS -L"{p}"/lib -Wl,-rpath="{p}"/lib" '
312  'CFLAGS="$CFLAGS -I"{p}"/include" '
313  'CPPFLAGS="$CPPFLAGS -I"{p}"/include" '
314  'PY_PREFIX={p} '
315  './configure --prefix={p} {args}'
316  ).format(
317  p=self.option('prefix'),
318  args=shell_join(' ', (
319  ShellQuoted('{k}={v}').format(k=k, v=v)
320  for k, v in autoconf_options.items()
321  )),
322  )),
323  ]
324 
def run(self, shell_cmd)
def configure(self, name=None)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder.configure (   self,
  name = None 
)

Definition at line 303 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.configure(), folly.format(), fbcode_builder.FBCodeBuilder.option(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), and shell_quoting.shell_join().

303  def configure(self, name=None):
304  autoconf_options = {}
305  if name is not None:
306  autoconf_options.update(
307  self.option('{0}:autoconf_options'.format(name), {})
308  )
309  return [
310  self.run(ShellQuoted(
311  'LDFLAGS="$LDFLAGS -L"{p}"/lib -Wl,-rpath="{p}"/lib" '
312  'CFLAGS="$CFLAGS -I"{p}"/include" '
313  'CPPFLAGS="$CPPFLAGS -I"{p}"/include" '
314  'PY_PREFIX={p} '
315  './configure --prefix={p} {args}'
316  ).format(
317  p=self.option('prefix'),
318  args=shell_join(' ', (
319  ShellQuoted('{k}={v}').format(k=k, v=v)
320  for k, v in autoconf_options.items()
321  )),
322  )),
323  ]
324 
def run(self, shell_cmd)
def configure(self, name=None)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder.configure (   self,
  name = None 
)

Definition at line 303 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.configure(), folly.format(), fbcode_builder.FBCodeBuilder.option(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), and shell_quoting.shell_join().

303  def configure(self, name=None):
304  autoconf_options = {}
305  if name is not None:
306  autoconf_options.update(
307  self.option('{0}:autoconf_options'.format(name), {})
308  )
309  return [
310  self.run(ShellQuoted(
311  'LDFLAGS="$LDFLAGS -L"{p}"/lib -Wl,-rpath="{p}"/lib" '
312  'CFLAGS="$CFLAGS -I"{p}"/include" '
313  'CPPFLAGS="$CPPFLAGS -I"{p}"/include" '
314  'PY_PREFIX={p} '
315  './configure --prefix={p} {args}'
316  ).format(
317  p=self.option('prefix'),
318  args=shell_join(' ', (
319  ShellQuoted('{k}={v}').format(k=k, v=v)
320  for k, v in autoconf_options.items()
321  )),
322  )),
323  ]
324 
def run(self, shell_cmd)
def configure(self, name=None)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder.copy_local_repo (   self,
  dir,
  dest_name 
)
Copy the local repo at `dir` into this step's `workdir()`, analog of:
  cp -r /path/to/folly folly

Definition at line 175 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.copy_local_repo().

175  def copy_local_repo(self, dir, dest_name):
176  '''
177  Copy the local repo at `dir` into this step's `workdir()`, analog of:
178  cp -r /path/to/folly folly
179  '''
180  raise NotImplementedError
181 
def copy_local_repo(self, dir, dest_name)
def fbcode_builder.FBCodeBuilder.copy_local_repo (   self,
  dir,
  dest_name 
)
Copy the local repo at `dir` into this step's `workdir()`, analog of:
  cp -r /path/to/folly folly

Definition at line 175 of file fbcode_builder.py.

Referenced by fbcode_builder.FBCodeBuilder.copy_local_repo(), and fbcode_builder.FBCodeBuilder.github_project_workdir().

175  def copy_local_repo(self, dir, dest_name):
176  '''
177  Copy the local repo at `dir` into this step's `workdir()`, analog of:
178  cp -r /path/to/folly folly
179  '''
180  raise NotImplementedError
181 
def copy_local_repo(self, dir, dest_name)
def fbcode_builder.FBCodeBuilder.copy_local_repo (   self,
  dir,
  dest_name 
)
Copy the local repo at `dir` into this step's `workdir()`, analog of:
  cp -r /path/to/folly folly

Definition at line 175 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.copy_local_repo().

175  def copy_local_repo(self, dir, dest_name):
176  '''
177  Copy the local repo at `dir` into this step's `workdir()`, analog of:
178  cp -r /path/to/folly folly
179  '''
180  raise NotImplementedError
181 
def copy_local_repo(self, dir, dest_name)
def fbcode_builder.FBCodeBuilder.copy_local_repo (   self,
  dir,
  dest_name 
)
Copy the local repo at `dir` into this step's `workdir()`, analog of:
  cp -r /path/to/folly folly

Definition at line 175 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.copy_local_repo().

175  def copy_local_repo(self, dir, dest_name):
176  '''
177  Copy the local repo at `dir` into this step's `workdir()`, analog of:
178  cp -r /path/to/folly folly
179  '''
180  raise NotImplementedError
181 
def copy_local_repo(self, dir, dest_name)
def fbcode_builder.FBCodeBuilder.debian_ccache_setup_steps (   self)

Definition at line 249 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.debian_ccache_setup_steps().

250  return [] # It's ok to ship a renderer without ccache support.
251 
def fbcode_builder.FBCodeBuilder.debian_ccache_setup_steps (   self)

Definition at line 249 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.debian_ccache_setup_steps().

250  return [] # It's ok to ship a renderer without ccache support.
251 
def fbcode_builder.FBCodeBuilder.debian_ccache_setup_steps (   self)

Definition at line 249 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.debian_ccache_setup_steps().

250  return [] # It's ok to ship a renderer without ccache support.
251 
def fbcode_builder.FBCodeBuilder.debian_ccache_setup_steps (   self)

Definition at line 249 of file fbcode_builder.py.

Referenced by fbcode_builder.FBCodeBuilder.debian_ccache_setup_steps(), and fbcode_builder.FBCodeBuilder.install_debian_deps().

250  return [] # It's ok to ship a renderer without ccache support.
251 
def fbcode_builder.FBCodeBuilder.debian_deps (   self)

Definition at line 182 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.debian_deps().

182  def debian_deps(self):
183  return [
184  'autoconf-archive',
185  'bison',
186  'build-essential',
187  'cmake',
188  'curl',
189  'flex',
190  'git',
191  'gperf',
192  'joe',
193  'libboost-all-dev',
194  'libcap-dev',
195  'libdouble-conversion-dev',
196  'libevent-dev',
197  'libgflags-dev',
198  'libgoogle-glog-dev',
199  'libkrb5-dev',
200  'libpcre3-dev',
201  'libpthread-stubs0-dev',
202  'libnuma-dev',
203  'libsasl2-dev',
204  'libsnappy-dev',
205  'libsqlite3-dev',
206  'libssl-dev',
207  'libtool',
208  'netcat-openbsd',
209  'pkg-config',
210  'sudo',
211  'unzip',
212  'wget',
213  ]
214 
def fbcode_builder.FBCodeBuilder.debian_deps (   self)

Definition at line 182 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.debian_deps().

182  def debian_deps(self):
183  return [
184  'autoconf-archive',
185  'bison',
186  'build-essential',
187  'cmake',
188  'curl',
189  'flex',
190  'git',
191  'gperf',
192  'joe',
193  'libboost-all-dev',
194  'libcap-dev',
195  'libdouble-conversion-dev',
196  'libevent-dev',
197  'libgflags-dev',
198  'libgoogle-glog-dev',
199  'libkrb5-dev',
200  'libpcre3-dev',
201  'libpthread-stubs0-dev',
202  'libnuma-dev',
203  'libsasl2-dev',
204  'libsnappy-dev',
205  'libsqlite3-dev',
206  'libssl-dev',
207  'libtool',
208  'netcat-openbsd',
209  'pkg-config',
210  'sudo',
211  'unzip',
212  'wget',
213  ]
214 
def fbcode_builder.FBCodeBuilder.debian_deps (   self)

Definition at line 182 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.debian_deps().

182  def debian_deps(self):
183  return [
184  'autoconf-archive',
185  'bison',
186  'build-essential',
187  'cmake',
188  'curl',
189  'flex',
190  'git',
191  'gperf',
192  'joe',
193  'libboost-all-dev',
194  'libcap-dev',
195  'libdouble-conversion-dev',
196  'libevent-dev',
197  'libgflags-dev',
198  'libgoogle-glog-dev',
199  'libkrb5-dev',
200  'libpcre3-dev',
201  'libpthread-stubs0-dev',
202  'libnuma-dev',
203  'libsasl2-dev',
204  'libsnappy-dev',
205  'libsqlite3-dev',
206  'libssl-dev',
207  'libtool',
208  'netcat-openbsd',
209  'pkg-config',
210  'sudo',
211  'unzip',
212  'wget',
213  ]
214 
def fbcode_builder.FBCodeBuilder.debian_deps (   self)

Definition at line 182 of file fbcode_builder.py.

Referenced by fbcode_builder.FBCodeBuilder.debian_deps(), and fbcode_builder.FBCodeBuilder.install_debian_deps().

182  def debian_deps(self):
183  return [
184  'autoconf-archive',
185  'bison',
186  'build-essential',
187  'cmake',
188  'curl',
189  'flex',
190  'git',
191  'gperf',
192  'joe',
193  'libboost-all-dev',
194  'libcap-dev',
195  'libdouble-conversion-dev',
196  'libevent-dev',
197  'libgflags-dev',
198  'libgoogle-glog-dev',
199  'libkrb5-dev',
200  'libpcre3-dev',
201  'libpthread-stubs0-dev',
202  'libnuma-dev',
203  'libsasl2-dev',
204  'libsnappy-dev',
205  'libsqlite3-dev',
206  'libssl-dev',
207  'libtool',
208  'netcat-openbsd',
209  'pkg-config',
210  'sudo',
211  'unzip',
212  'wget',
213  ]
214 
def fbcode_builder.FBCodeBuilder.diagnostics (   self)

Definition at line 151 of file fbcode_builder.py.

References shell_builder.ShellFBCodeBuilder.comment(), docker_builder.DockerFBCodeBuilder.comment(), fbcode_builder.FBCodeBuilder.diagnostics(), folly.format(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

151  def diagnostics(self):
152  'Log some system diagnostics before/after setup for ease of debugging'
153  # The builder's repr is not used in a command to avoid pointlessly
154  # invalidating Docker's build cache.
155  return self.step('Diagnostics', [
156  self.comment('Builder {0}'.format(repr(self))),
157  self.run(ShellQuoted('hostname')),
158  self.run(ShellQuoted('cat /etc/issue || echo no /etc/issue')),
159  self.run(ShellQuoted('g++ --version || echo g++ not installed')),
160  self.run(ShellQuoted('cmake --version || echo cmake not installed')),
161  ])
162 
def run(self, shell_cmd)
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def fbcode_builder.FBCodeBuilder.diagnostics (   self)

Definition at line 151 of file fbcode_builder.py.

References shell_builder.ShellFBCodeBuilder.comment(), docker_builder.DockerFBCodeBuilder.comment(), folly.format(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

Referenced by fbcode_builder.FBCodeBuilder.build(), and fbcode_builder.FBCodeBuilder.diagnostics().

151  def diagnostics(self):
152  'Log some system diagnostics before/after setup for ease of debugging'
153  # The builder's repr is not used in a command to avoid pointlessly
154  # invalidating Docker's build cache.
155  return self.step('Diagnostics', [
156  self.comment('Builder {0}'.format(repr(self))),
157  self.run(ShellQuoted('hostname')),
158  self.run(ShellQuoted('cat /etc/issue || echo no /etc/issue')),
159  self.run(ShellQuoted('g++ --version || echo g++ not installed')),
160  self.run(ShellQuoted('cmake --version || echo cmake not installed')),
161  ])
162 
def run(self, shell_cmd)
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def fbcode_builder.FBCodeBuilder.diagnostics (   self)

Definition at line 151 of file fbcode_builder.py.

References shell_builder.ShellFBCodeBuilder.comment(), docker_builder.DockerFBCodeBuilder.comment(), fbcode_builder.FBCodeBuilder.diagnostics(), folly.format(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

151  def diagnostics(self):
152  'Log some system diagnostics before/after setup for ease of debugging'
153  # The builder's repr is not used in a command to avoid pointlessly
154  # invalidating Docker's build cache.
155  return self.step('Diagnostics', [
156  self.comment('Builder {0}'.format(repr(self))),
157  self.run(ShellQuoted('hostname')),
158  self.run(ShellQuoted('cat /etc/issue || echo no /etc/issue')),
159  self.run(ShellQuoted('g++ --version || echo g++ not installed')),
160  self.run(ShellQuoted('cmake --version || echo cmake not installed')),
161  ])
162 
def run(self, shell_cmd)
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def fbcode_builder.FBCodeBuilder.diagnostics (   self)

Definition at line 151 of file fbcode_builder.py.

References shell_builder.ShellFBCodeBuilder.comment(), docker_builder.DockerFBCodeBuilder.comment(), fbcode_builder.FBCodeBuilder.diagnostics(), folly.format(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

151  def diagnostics(self):
152  'Log some system diagnostics before/after setup for ease of debugging'
153  # The builder's repr is not used in a command to avoid pointlessly
154  # invalidating Docker's build cache.
155  return self.step('Diagnostics', [
156  self.comment('Builder {0}'.format(repr(self))),
157  self.run(ShellQuoted('hostname')),
158  self.run(ShellQuoted('cat /etc/issue || echo no /etc/issue')),
159  self.run(ShellQuoted('g++ --version || echo g++ not installed')),
160  self.run(ShellQuoted('cmake --version || echo cmake not installed')),
161  ])
162 
def run(self, shell_cmd)
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def fbcode_builder.FBCodeBuilder.fb_github_autoconf_install (   self,
  project_and_path,
  github_org = 'facebook' 
)

Definition at line 359 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.autoconf_install(), fbcode_builder.FBCodeBuilder.fb_github_autoconf_install(), and fbcode_builder.FBCodeBuilder.fb_github_project_workdir().

359  def fb_github_autoconf_install(self, project_and_path, github_org='facebook'):
360  return [
361  self.fb_github_project_workdir(project_and_path, github_org),
362  self.autoconf_install(project_and_path),
363  ]
364 
def fb_github_project_workdir(self, project_and_path, github_org='facebook')
def fb_github_autoconf_install(self, project_and_path, github_org='facebook')
def autoconf_install(self, name)
def fbcode_builder.FBCodeBuilder.fb_github_autoconf_install (   self,
  project_and_path,
  github_org = 'facebook' 
)

Definition at line 359 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.autoconf_install(), fbcode_builder.FBCodeBuilder.fb_github_autoconf_install(), and fbcode_builder.FBCodeBuilder.fb_github_project_workdir().

359  def fb_github_autoconf_install(self, project_and_path, github_org='facebook'):
360  return [
361  self.fb_github_project_workdir(project_and_path, github_org),
362  self.autoconf_install(project_and_path),
363  ]
364 
def fb_github_project_workdir(self, project_and_path, github_org='facebook')
def fb_github_autoconf_install(self, project_and_path, github_org='facebook')
def autoconf_install(self, name)
def fbcode_builder.FBCodeBuilder.fb_github_autoconf_install (   self,
  project_and_path,
  github_org = 'facebook' 
)

Definition at line 359 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.autoconf_install(), and fbcode_builder.FBCodeBuilder.fb_github_project_workdir().

Referenced by fbcode_builder.FBCodeBuilder.fb_github_autoconf_install().

359  def fb_github_autoconf_install(self, project_and_path, github_org='facebook'):
360  return [
361  self.fb_github_project_workdir(project_and_path, github_org),
362  self.autoconf_install(project_and_path),
363  ]
364 
def fb_github_project_workdir(self, project_and_path, github_org='facebook')
def fb_github_autoconf_install(self, project_and_path, github_org='facebook')
def autoconf_install(self, name)
def fbcode_builder.FBCodeBuilder.fb_github_autoconf_install (   self,
  project_and_path,
  github_org = 'facebook' 
)

Definition at line 359 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.autoconf_install(), fbcode_builder.FBCodeBuilder.fb_github_autoconf_install(), and fbcode_builder.FBCodeBuilder.fb_github_project_workdir().

359  def fb_github_autoconf_install(self, project_and_path, github_org='facebook'):
360  return [
361  self.fb_github_project_workdir(project_and_path, github_org),
362  self.autoconf_install(project_and_path),
363  ]
364 
def fb_github_project_workdir(self, project_and_path, github_org='facebook')
def fb_github_autoconf_install(self, project_and_path, github_org='facebook')
def autoconf_install(self, name)
def fbcode_builder.FBCodeBuilder.fb_github_cmake_install (   self,
  project_and_path,
  cmake_path = '..',
  github_org = 'facebook' 
)

Definition at line 365 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.cmake_install(), fbcode_builder.FBCodeBuilder.fb_github_cmake_install(), and fbcode_builder.FBCodeBuilder.fb_github_project_workdir().

365  def fb_github_cmake_install(self, project_and_path, cmake_path='..', github_org='facebook'):
366  return [
367  self.fb_github_project_workdir(project_and_path, github_org),
368  self.cmake_install(project_and_path, cmake_path),
369  ]
370 
def fb_github_project_workdir(self, project_and_path, github_org='facebook')
def fb_github_cmake_install(self, project_and_path, cmake_path='..', github_org='facebook')
def cmake_install(self, name, cmake_path='..')
def fbcode_builder.FBCodeBuilder.fb_github_cmake_install (   self,
  project_and_path,
  cmake_path = '..',
  github_org = 'facebook' 
)

Definition at line 365 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.cmake_install(), fbcode_builder.FBCodeBuilder.fb_github_cmake_install(), and fbcode_builder.FBCodeBuilder.fb_github_project_workdir().

365  def fb_github_cmake_install(self, project_and_path, cmake_path='..', github_org='facebook'):
366  return [
367  self.fb_github_project_workdir(project_and_path, github_org),
368  self.cmake_install(project_and_path, cmake_path),
369  ]
370 
def fb_github_project_workdir(self, project_and_path, github_org='facebook')
def fb_github_cmake_install(self, project_and_path, cmake_path='..', github_org='facebook')
def cmake_install(self, name, cmake_path='..')
def fbcode_builder.FBCodeBuilder.fb_github_cmake_install (   self,
  project_and_path,
  cmake_path = '..',
  github_org = 'facebook' 
)

Definition at line 365 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.cmake_install(), fbcode_builder.FBCodeBuilder.fb_github_cmake_install(), and fbcode_builder.FBCodeBuilder.fb_github_project_workdir().

365  def fb_github_cmake_install(self, project_and_path, cmake_path='..', github_org='facebook'):
366  return [
367  self.fb_github_project_workdir(project_and_path, github_org),
368  self.cmake_install(project_and_path, cmake_path),
369  ]
370 
def fb_github_project_workdir(self, project_and_path, github_org='facebook')
def fb_github_cmake_install(self, project_and_path, cmake_path='..', github_org='facebook')
def cmake_install(self, name, cmake_path='..')
def fbcode_builder.FBCodeBuilder.fb_github_cmake_install (   self,
  project_and_path,
  cmake_path = '..',
  github_org = 'facebook' 
)

Definition at line 365 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.cmake_install(), and fbcode_builder.FBCodeBuilder.fb_github_project_workdir().

Referenced by fbcode_builder.FBCodeBuilder.fb_github_cmake_install().

365  def fb_github_cmake_install(self, project_and_path, cmake_path='..', github_org='facebook'):
366  return [
367  self.fb_github_project_workdir(project_and_path, github_org),
368  self.cmake_install(project_and_path, cmake_path),
369  ]
370 
def fb_github_project_workdir(self, project_and_path, github_org='facebook')
def fb_github_cmake_install(self, project_and_path, cmake_path='..', github_org='facebook')
def cmake_install(self, name, cmake_path='..')
def fbcode_builder.FBCodeBuilder.fb_github_project_workdir (   self,
  project_and_path,
  github_org = 'facebook' 
)

Definition at line 278 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.github_project_workdir().

Referenced by fbcode_builder.FBCodeBuilder.fb_github_autoconf_install(), fbcode_builder.FBCodeBuilder.fb_github_cmake_install(), and fbcode_builder.FBCodeBuilder.fb_github_project_workdir().

278  def fb_github_project_workdir(self, project_and_path, github_org='facebook'):
279  'This helper lets Facebook-internal CI special-cases FB projects'
280  project, path = project_and_path.split('/', 1)
281  return self.github_project_workdir(github_org + '/' + project, path)
282 
def fb_github_project_workdir(self, project_and_path, github_org='facebook')
def github_project_workdir(self, project, path)
def fbcode_builder.FBCodeBuilder.fb_github_project_workdir (   self,
  project_and_path,
  github_org = 'facebook' 
)

Definition at line 278 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.fb_github_project_workdir(), and fbcode_builder.FBCodeBuilder.github_project_workdir().

278  def fb_github_project_workdir(self, project_and_path, github_org='facebook'):
279  'This helper lets Facebook-internal CI special-cases FB projects'
280  project, path = project_and_path.split('/', 1)
281  return self.github_project_workdir(github_org + '/' + project, path)
282 
def fb_github_project_workdir(self, project_and_path, github_org='facebook')
def github_project_workdir(self, project, path)
def fbcode_builder.FBCodeBuilder.fb_github_project_workdir (   self,
  project_and_path,
  github_org = 'facebook' 
)

Definition at line 278 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.fb_github_project_workdir(), and fbcode_builder.FBCodeBuilder.github_project_workdir().

278  def fb_github_project_workdir(self, project_and_path, github_org='facebook'):
279  'This helper lets Facebook-internal CI special-cases FB projects'
280  project, path = project_and_path.split('/', 1)
281  return self.github_project_workdir(github_org + '/' + project, path)
282 
def fb_github_project_workdir(self, project_and_path, github_org='facebook')
def github_project_workdir(self, project, path)
def fbcode_builder.FBCodeBuilder.fb_github_project_workdir (   self,
  project_and_path,
  github_org = 'facebook' 
)

Definition at line 278 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.fb_github_project_workdir(), and fbcode_builder.FBCodeBuilder.github_project_workdir().

278  def fb_github_project_workdir(self, project_and_path, github_org='facebook'):
279  'This helper lets Facebook-internal CI special-cases FB projects'
280  project, path = project_and_path.split('/', 1)
281  return self.github_project_workdir(github_org + '/' + project, path)
282 
def fb_github_project_workdir(self, project_and_path, github_org='facebook')
def github_project_workdir(self, project, path)
def fbcode_builder.FBCodeBuilder.github_project_workdir (   self,
  project,
  path 
)

Definition at line 252 of file fbcode_builder.py.

References docker_builder.DockerFBCodeBuilder.copy_local_repo(), fbcode_builder.FBCodeBuilder.copy_local_repo(), folly.format(), fbcode_builder.FBCodeBuilder.github_project_workdir(), fbcode_builder.FBCodeBuilder.option(), shell_quoting.path_join(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), docker_builder.DockerFBCodeBuilder.step(), fbcode_builder.FBCodeBuilder.step(), docker_builder.DockerFBCodeBuilder.workdir(), and fbcode_builder.FBCodeBuilder.workdir().

252  def github_project_workdir(self, project, path):
253  # Only check out a non-default branch if requested. This especially
254  # makes sense when building from a local repo.
255  git_hash = self.option(
256  '{0}:git_hash'.format(project),
257  # Any repo that has a hash in deps/github_hashes defaults to
258  # that, with the goal of making builds maximally consistent.
259  self._github_hashes.get(project, '')
260  )
261  maybe_change_branch = [
262  self.run(ShellQuoted('git checkout {hash}').format(hash=git_hash)),
263  ] if git_hash else []
264 
265  base_dir = self.option('projects_dir')
266 
267  local_repo_dir = self.option('{0}:local_repo_dir'.format(project), '')
268  return self.step('Check out {0}, workdir {1}'.format(project, path), [
269  self.workdir(base_dir),
270  self.run(
271  ShellQuoted('git clone https://github.com/{p}').format(p=project)
272  ) if not local_repo_dir else self.copy_local_repo(
273  local_repo_dir, os.path.basename(project)
274  ),
275  self.workdir(path_join(base_dir, os.path.basename(project), path)),
276  ] + maybe_change_branch)
277 
def run(self, shell_cmd)
def copy_local_repo(self, dir, dest_name)
def github_project_workdir(self, project, path)
def step(self, name, actions)
def path_join(args)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def fbcode_builder.FBCodeBuilder.github_project_workdir (   self,
  project,
  path 
)

Definition at line 252 of file fbcode_builder.py.

References docker_builder.DockerFBCodeBuilder.copy_local_repo(), fbcode_builder.FBCodeBuilder.copy_local_repo(), folly.format(), fbcode_builder.FBCodeBuilder.option(), shell_quoting.path_join(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), docker_builder.DockerFBCodeBuilder.step(), fbcode_builder.FBCodeBuilder.step(), docker_builder.DockerFBCodeBuilder.workdir(), and fbcode_builder.FBCodeBuilder.workdir().

Referenced by fbcode_builder.FBCodeBuilder.fb_github_project_workdir(), and fbcode_builder.FBCodeBuilder.github_project_workdir().

252  def github_project_workdir(self, project, path):
253  # Only check out a non-default branch if requested. This especially
254  # makes sense when building from a local repo.
255  git_hash = self.option(
256  '{0}:git_hash'.format(project),
257  # Any repo that has a hash in deps/github_hashes defaults to
258  # that, with the goal of making builds maximally consistent.
259  self._github_hashes.get(project, '')
260  )
261  maybe_change_branch = [
262  self.run(ShellQuoted('git checkout {hash}').format(hash=git_hash)),
263  ] if git_hash else []
264 
265  base_dir = self.option('projects_dir')
266 
267  local_repo_dir = self.option('{0}:local_repo_dir'.format(project), '')
268  return self.step('Check out {0}, workdir {1}'.format(project, path), [
269  self.workdir(base_dir),
270  self.run(
271  ShellQuoted('git clone https://github.com/{p}').format(p=project)
272  ) if not local_repo_dir else self.copy_local_repo(
273  local_repo_dir, os.path.basename(project)
274  ),
275  self.workdir(path_join(base_dir, os.path.basename(project), path)),
276  ] + maybe_change_branch)
277 
def run(self, shell_cmd)
def copy_local_repo(self, dir, dest_name)
def github_project_workdir(self, project, path)
def step(self, name, actions)
def path_join(args)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def fbcode_builder.FBCodeBuilder.github_project_workdir (   self,
  project,
  path 
)

Definition at line 252 of file fbcode_builder.py.

References docker_builder.DockerFBCodeBuilder.copy_local_repo(), fbcode_builder.FBCodeBuilder.copy_local_repo(), folly.format(), fbcode_builder.FBCodeBuilder.github_project_workdir(), fbcode_builder.FBCodeBuilder.option(), shell_quoting.path_join(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), docker_builder.DockerFBCodeBuilder.step(), fbcode_builder.FBCodeBuilder.step(), docker_builder.DockerFBCodeBuilder.workdir(), and fbcode_builder.FBCodeBuilder.workdir().

252  def github_project_workdir(self, project, path):
253  # Only check out a non-default branch if requested. This especially
254  # makes sense when building from a local repo.
255  git_hash = self.option(
256  '{0}:git_hash'.format(project),
257  # Any repo that has a hash in deps/github_hashes defaults to
258  # that, with the goal of making builds maximally consistent.
259  self._github_hashes.get(project, '')
260  )
261  maybe_change_branch = [
262  self.run(ShellQuoted('git checkout {hash}').format(hash=git_hash)),
263  ] if git_hash else []
264 
265  base_dir = self.option('projects_dir')
266 
267  local_repo_dir = self.option('{0}:local_repo_dir'.format(project), '')
268  return self.step('Check out {0}, workdir {1}'.format(project, path), [
269  self.workdir(base_dir),
270  self.run(
271  ShellQuoted('git clone https://github.com/{p}').format(p=project)
272  ) if not local_repo_dir else self.copy_local_repo(
273  local_repo_dir, os.path.basename(project)
274  ),
275  self.workdir(path_join(base_dir, os.path.basename(project), path)),
276  ] + maybe_change_branch)
277 
def run(self, shell_cmd)
def copy_local_repo(self, dir, dest_name)
def github_project_workdir(self, project, path)
def step(self, name, actions)
def path_join(args)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def fbcode_builder.FBCodeBuilder.github_project_workdir (   self,
  project,
  path 
)

Definition at line 252 of file fbcode_builder.py.

References docker_builder.DockerFBCodeBuilder.copy_local_repo(), fbcode_builder.FBCodeBuilder.copy_local_repo(), folly.format(), fbcode_builder.FBCodeBuilder.github_project_workdir(), fbcode_builder.FBCodeBuilder.option(), shell_quoting.path_join(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), docker_builder.DockerFBCodeBuilder.step(), fbcode_builder.FBCodeBuilder.step(), docker_builder.DockerFBCodeBuilder.workdir(), and fbcode_builder.FBCodeBuilder.workdir().

252  def github_project_workdir(self, project, path):
253  # Only check out a non-default branch if requested. This especially
254  # makes sense when building from a local repo.
255  git_hash = self.option(
256  '{0}:git_hash'.format(project),
257  # Any repo that has a hash in deps/github_hashes defaults to
258  # that, with the goal of making builds maximally consistent.
259  self._github_hashes.get(project, '')
260  )
261  maybe_change_branch = [
262  self.run(ShellQuoted('git checkout {hash}').format(hash=git_hash)),
263  ] if git_hash else []
264 
265  base_dir = self.option('projects_dir')
266 
267  local_repo_dir = self.option('{0}:local_repo_dir'.format(project), '')
268  return self.step('Check out {0}, workdir {1}'.format(project, path), [
269  self.workdir(base_dir),
270  self.run(
271  ShellQuoted('git clone https://github.com/{p}').format(p=project)
272  ) if not local_repo_dir else self.copy_local_repo(
273  local_repo_dir, os.path.basename(project)
274  ),
275  self.workdir(path_join(base_dir, os.path.basename(project), path)),
276  ] + maybe_change_branch)
277 
def run(self, shell_cmd)
def copy_local_repo(self, dir, dest_name)
def github_project_workdir(self, project, path)
def step(self, name, actions)
def path_join(args)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def fbcode_builder.FBCodeBuilder.has_option (   self,
  name 
)
def fbcode_builder.FBCodeBuilder.has_option (   self,
  name 
)
def fbcode_builder.FBCodeBuilder.has_option (   self,
  name 
)
def fbcode_builder.FBCodeBuilder.has_option (   self,
  name 
)
def fbcode_builder.FBCodeBuilder.install_debian_deps (   self)

Definition at line 219 of file fbcode_builder.py.

References docker_builder.DockerFBCodeBuilder.debian_ccache_setup_steps(), fbcode_builder.FBCodeBuilder.debian_ccache_setup_steps(), fbcode_builder.FBCodeBuilder.debian_deps(), folly.format(), fbcode_builder.FBCodeBuilder.install_debian_deps(), fbcode_builder.FBCodeBuilder.option(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), shell_quoting.shell_join(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

220  actions = [
221  self.run(
222  ShellQuoted('apt-get update && apt-get install -yq {deps}').format(
223  deps=shell_join(' ', (
224  ShellQuoted(dep) for dep in self.debian_deps())))
225  ),
226  ]
227  gcc_version = self.option('gcc_version')
228 
229  # Make the selected GCC the default before building anything
230  actions.extend([
231  self.run(ShellQuoted('apt-get install -yq {c} {cpp}').format(
232  c=ShellQuoted('gcc-{v}').format(v=gcc_version),
233  cpp=ShellQuoted('g++-{v}').format(v=gcc_version),
234  )),
235  self.run(ShellQuoted(
236  'update-alternatives --install /usr/bin/gcc gcc {c} 40 '
237  '--slave /usr/bin/g++ g++ {cpp}'
238  ).format(
239  c=ShellQuoted('/usr/bin/gcc-{v}').format(v=gcc_version),
240  cpp=ShellQuoted('/usr/bin/g++-{v}').format(v=gcc_version),
241  )),
242  self.run(ShellQuoted('update-alternatives --config gcc')),
243  ])
244 
245  actions.extend(self.debian_ccache_setup_steps())
246 
247  return self.step('Install packages for Debian-based OS', actions)
248 
def run(self, shell_cmd)
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder.install_debian_deps (   self)

Definition at line 219 of file fbcode_builder.py.

References docker_builder.DockerFBCodeBuilder.debian_ccache_setup_steps(), fbcode_builder.FBCodeBuilder.debian_ccache_setup_steps(), fbcode_builder.FBCodeBuilder.debian_deps(), folly.format(), fbcode_builder.FBCodeBuilder.install_debian_deps(), fbcode_builder.FBCodeBuilder.option(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), shell_quoting.shell_join(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

220  actions = [
221  self.run(
222  ShellQuoted('apt-get update && apt-get install -yq {deps}').format(
223  deps=shell_join(' ', (
224  ShellQuoted(dep) for dep in self.debian_deps())))
225  ),
226  ]
227  gcc_version = self.option('gcc_version')
228 
229  # Make the selected GCC the default before building anything
230  actions.extend([
231  self.run(ShellQuoted('apt-get install -yq {c} {cpp}').format(
232  c=ShellQuoted('gcc-{v}').format(v=gcc_version),
233  cpp=ShellQuoted('g++-{v}').format(v=gcc_version),
234  )),
235  self.run(ShellQuoted(
236  'update-alternatives --install /usr/bin/gcc gcc {c} 40 '
237  '--slave /usr/bin/g++ g++ {cpp}'
238  ).format(
239  c=ShellQuoted('/usr/bin/gcc-{v}').format(v=gcc_version),
240  cpp=ShellQuoted('/usr/bin/g++-{v}').format(v=gcc_version),
241  )),
242  self.run(ShellQuoted('update-alternatives --config gcc')),
243  ])
244 
245  actions.extend(self.debian_ccache_setup_steps())
246 
247  return self.step('Install packages for Debian-based OS', actions)
248 
def run(self, shell_cmd)
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder.install_debian_deps (   self)

Definition at line 219 of file fbcode_builder.py.

References docker_builder.DockerFBCodeBuilder.debian_ccache_setup_steps(), fbcode_builder.FBCodeBuilder.debian_ccache_setup_steps(), fbcode_builder.FBCodeBuilder.debian_deps(), folly.format(), fbcode_builder.FBCodeBuilder.install_debian_deps(), fbcode_builder.FBCodeBuilder.option(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), shell_quoting.shell_join(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

220  actions = [
221  self.run(
222  ShellQuoted('apt-get update && apt-get install -yq {deps}').format(
223  deps=shell_join(' ', (
224  ShellQuoted(dep) for dep in self.debian_deps())))
225  ),
226  ]
227  gcc_version = self.option('gcc_version')
228 
229  # Make the selected GCC the default before building anything
230  actions.extend([
231  self.run(ShellQuoted('apt-get install -yq {c} {cpp}').format(
232  c=ShellQuoted('gcc-{v}').format(v=gcc_version),
233  cpp=ShellQuoted('g++-{v}').format(v=gcc_version),
234  )),
235  self.run(ShellQuoted(
236  'update-alternatives --install /usr/bin/gcc gcc {c} 40 '
237  '--slave /usr/bin/g++ g++ {cpp}'
238  ).format(
239  c=ShellQuoted('/usr/bin/gcc-{v}').format(v=gcc_version),
240  cpp=ShellQuoted('/usr/bin/g++-{v}').format(v=gcc_version),
241  )),
242  self.run(ShellQuoted('update-alternatives --config gcc')),
243  ])
244 
245  actions.extend(self.debian_ccache_setup_steps())
246 
247  return self.step('Install packages for Debian-based OS', actions)
248 
def run(self, shell_cmd)
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder.install_debian_deps (   self)

Definition at line 219 of file fbcode_builder.py.

References docker_builder.DockerFBCodeBuilder.debian_ccache_setup_steps(), fbcode_builder.FBCodeBuilder.debian_ccache_setup_steps(), fbcode_builder.FBCodeBuilder.debian_deps(), folly.format(), fbcode_builder.FBCodeBuilder.option(), docker_builder.DockerFBCodeBuilder.run(), fbcode_builder.FBCodeBuilder.run(), shell_quoting.shell_join(), docker_builder.DockerFBCodeBuilder.step(), and fbcode_builder.FBCodeBuilder.step().

Referenced by fbcode_builder.FBCodeBuilder.install_debian_deps(), and docker_builder.DockerFBCodeBuilder.setup().

220  actions = [
221  self.run(
222  ShellQuoted('apt-get update && apt-get install -yq {deps}').format(
223  deps=shell_join(' ', (
224  ShellQuoted(dep) for dep in self.debian_deps())))
225  ),
226  ]
227  gcc_version = self.option('gcc_version')
228 
229  # Make the selected GCC the default before building anything
230  actions.extend([
231  self.run(ShellQuoted('apt-get install -yq {c} {cpp}').format(
232  c=ShellQuoted('gcc-{v}').format(v=gcc_version),
233  cpp=ShellQuoted('g++-{v}').format(v=gcc_version),
234  )),
235  self.run(ShellQuoted(
236  'update-alternatives --install /usr/bin/gcc gcc {c} 40 '
237  '--slave /usr/bin/g++ g++ {cpp}'
238  ).format(
239  c=ShellQuoted('/usr/bin/gcc-{v}').format(v=gcc_version),
240  cpp=ShellQuoted('/usr/bin/g++-{v}').format(v=gcc_version),
241  )),
242  self.run(ShellQuoted('update-alternatives --config gcc')),
243  ])
244 
245  actions.extend(self.debian_ccache_setup_steps())
246 
247  return self.step('Install packages for Debian-based OS', actions)
248 
def run(self, shell_cmd)
def step(self, name, actions)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def shell_join(delim, it)
def fbcode_builder.FBCodeBuilder.make_and_install (   self,
  make_vars = None 
)

Definition at line 295 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._make_vars(), folly.format(), fbcode_builder.FBCodeBuilder.make_and_install(), fbcode_builder.FBCodeBuilder.parallel_make(), docker_builder.DockerFBCodeBuilder.run(), and fbcode_builder.FBCodeBuilder.run().

295  def make_and_install(self, make_vars=None):
296  return [
297  self.parallel_make(make_vars),
298  self.run(ShellQuoted('make install {vars}').format(
299  vars=self._make_vars(make_vars),
300  )),
301  ]
302 
def run(self, shell_cmd)
def _make_vars(self, make_vars)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def make_and_install(self, make_vars=None)
def parallel_make(self, make_vars=None)
def fbcode_builder.FBCodeBuilder.make_and_install (   self,
  make_vars = None 
)

Definition at line 295 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._make_vars(), folly.format(), fbcode_builder.FBCodeBuilder.make_and_install(), fbcode_builder.FBCodeBuilder.parallel_make(), docker_builder.DockerFBCodeBuilder.run(), and fbcode_builder.FBCodeBuilder.run().

295  def make_and_install(self, make_vars=None):
296  return [
297  self.parallel_make(make_vars),
298  self.run(ShellQuoted('make install {vars}').format(
299  vars=self._make_vars(make_vars),
300  )),
301  ]
302 
def run(self, shell_cmd)
def _make_vars(self, make_vars)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def make_and_install(self, make_vars=None)
def parallel_make(self, make_vars=None)
def fbcode_builder.FBCodeBuilder.make_and_install (   self,
  make_vars = None 
)

Definition at line 295 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._make_vars(), folly.format(), fbcode_builder.FBCodeBuilder.parallel_make(), docker_builder.DockerFBCodeBuilder.run(), and fbcode_builder.FBCodeBuilder.run().

Referenced by fbcode_builder.FBCodeBuilder.autoconf_install(), fbcode_builder.FBCodeBuilder.cmake_install(), and fbcode_builder.FBCodeBuilder.make_and_install().

295  def make_and_install(self, make_vars=None):
296  return [
297  self.parallel_make(make_vars),
298  self.run(ShellQuoted('make install {vars}').format(
299  vars=self._make_vars(make_vars),
300  )),
301  ]
302 
def run(self, shell_cmd)
def _make_vars(self, make_vars)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def make_and_install(self, make_vars=None)
def parallel_make(self, make_vars=None)
def fbcode_builder.FBCodeBuilder.make_and_install (   self,
  make_vars = None 
)

Definition at line 295 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._make_vars(), folly.format(), fbcode_builder.FBCodeBuilder.make_and_install(), fbcode_builder.FBCodeBuilder.parallel_make(), docker_builder.DockerFBCodeBuilder.run(), and fbcode_builder.FBCodeBuilder.run().

295  def make_and_install(self, make_vars=None):
296  return [
297  self.parallel_make(make_vars),
298  self.run(ShellQuoted('make install {vars}').format(
299  vars=self._make_vars(make_vars),
300  )),
301  ]
302 
def run(self, shell_cmd)
def _make_vars(self, make_vars)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def make_and_install(self, make_vars=None)
def parallel_make(self, make_vars=None)
def fbcode_builder.FBCodeBuilder.option (   self,
  name,
  default = None 
)

Definition at line 101 of file fbcode_builder.py.

References folly.format().

Referenced by docker_builder.DockerFBCodeBuilder._user(), fbcode_builder.FBCodeBuilder.cmake_configure(), fbcode_builder.FBCodeBuilder.configure(), docker_builder.DockerFBCodeBuilder.copy_local_repo(), docker_builder.DockerFBCodeBuilder.debian_ccache_setup_steps(), fbcode_builder.FBCodeBuilder.github_project_workdir(), fbcode_builder.FBCodeBuilder.install_debian_deps(), fbcode_builder.FBCodeBuilder.option(), fbcode_builder.FBCodeBuilder.parallel_make(), docker_builder.DockerFBCodeBuilder.setup(), and shell_builder.ShellFBCodeBuilder.setup().

101  def option(self, name, default=None):
102  value = self._options_do_not_access.get(name, default)
103  if value is None:
104  raise RuntimeError('Option {0} is required'.format(name))
105  self.options_used.add(name)
106  return value
107 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def fbcode_builder.FBCodeBuilder.option (   self,
  name,
  default = None 
)

Definition at line 101 of file fbcode_builder.py.

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

101  def option(self, name, default=None):
102  value = self._options_do_not_access.get(name, default)
103  if value is None:
104  raise RuntimeError('Option {0} is required'.format(name))
105  self.options_used.add(name)
106  return value
107 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def fbcode_builder.FBCodeBuilder.option (   self,
  name,
  default = None 
)

Definition at line 101 of file fbcode_builder.py.

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

101  def option(self, name, default=None):
102  value = self._options_do_not_access.get(name, default)
103  if value is None:
104  raise RuntimeError('Option {0} is required'.format(name))
105  self.options_used.add(name)
106  return value
107 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def fbcode_builder.FBCodeBuilder.option (   self,
  name,
  default = None 
)

Definition at line 101 of file fbcode_builder.py.

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

101  def option(self, name, default=None):
102  value = self._options_do_not_access.get(name, default)
103  if value is None:
104  raise RuntimeError('Option {0} is required'.format(name))
105  self.options_used.add(name)
106  return value
107 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def fbcode_builder.FBCodeBuilder.parallel_make (   self,
  make_vars = None 
)

Definition at line 289 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._make_vars(), folly.format(), fbcode_builder.FBCodeBuilder.option(), fbcode_builder.FBCodeBuilder.parallel_make(), docker_builder.DockerFBCodeBuilder.run(), and fbcode_builder.FBCodeBuilder.run().

289  def parallel_make(self, make_vars=None):
290  return self.run(ShellQuoted('make -j {n} {vars}').format(
291  n=self.option('make_parallelism'),
292  vars=self._make_vars(make_vars),
293  ))
294 
def run(self, shell_cmd)
def _make_vars(self, make_vars)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def parallel_make(self, make_vars=None)
def fbcode_builder.FBCodeBuilder.parallel_make (   self,
  make_vars = None 
)

Definition at line 289 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._make_vars(), folly.format(), fbcode_builder.FBCodeBuilder.option(), docker_builder.DockerFBCodeBuilder.run(), and fbcode_builder.FBCodeBuilder.run().

Referenced by fbcode_builder.FBCodeBuilder.make_and_install(), and fbcode_builder.FBCodeBuilder.parallel_make().

289  def parallel_make(self, make_vars=None):
290  return self.run(ShellQuoted('make -j {n} {vars}').format(
291  n=self.option('make_parallelism'),
292  vars=self._make_vars(make_vars),
293  ))
294 
def run(self, shell_cmd)
def _make_vars(self, make_vars)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def parallel_make(self, make_vars=None)
def fbcode_builder.FBCodeBuilder.parallel_make (   self,
  make_vars = None 
)

Definition at line 289 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._make_vars(), folly.format(), fbcode_builder.FBCodeBuilder.option(), fbcode_builder.FBCodeBuilder.parallel_make(), docker_builder.DockerFBCodeBuilder.run(), and fbcode_builder.FBCodeBuilder.run().

289  def parallel_make(self, make_vars=None):
290  return self.run(ShellQuoted('make -j {n} {vars}').format(
291  n=self.option('make_parallelism'),
292  vars=self._make_vars(make_vars),
293  ))
294 
def run(self, shell_cmd)
def _make_vars(self, make_vars)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def parallel_make(self, make_vars=None)
def fbcode_builder.FBCodeBuilder.parallel_make (   self,
  make_vars = None 
)

Definition at line 289 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._make_vars(), folly.format(), fbcode_builder.FBCodeBuilder.option(), fbcode_builder.FBCodeBuilder.parallel_make(), docker_builder.DockerFBCodeBuilder.run(), and fbcode_builder.FBCodeBuilder.run().

289  def parallel_make(self, make_vars=None):
290  return self.run(ShellQuoted('make -j {n} {vars}').format(
291  n=self.option('make_parallelism'),
292  vars=self._make_vars(make_vars),
293  ))
294 
def run(self, shell_cmd)
def _make_vars(self, make_vars)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
def option(self, name, default=None)
def parallel_make(self, make_vars=None)
def fbcode_builder.FBCodeBuilder.render (   self,
  steps 
)
Converts nested actions to your builder's expected output format.
Typically takes the output of build().

Definition at line 120 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._options_do_not_access, shell_builder.ShellFBCodeBuilder._render_impl(), docker_builder.DockerFBCodeBuilder._render_impl(), folly.format(), fbcode_builder.FBCodeBuilder.options_used, and fbcode_builder.FBCodeBuilder.render().

120  def render(self, steps):
121  '''
122 
123  Converts nested actions to your builder's expected output format.
124  Typically takes the output of build().
125 
126  '''
127  res = self._render_impl(steps) # Implementation-dependent
128  # Now that the output is rendered, we expect all options to have
129  # been used.
130  unused_options = set(self._options_do_not_access)
131  unused_options -= self.options_used
132  if unused_options:
133  raise RuntimeError(
134  'Unused options: {0} -- please check if you made a typo '
135  'in any of them. Those that are truly not useful should '
136  'be not be set so that this typo detection can be useful.'
137  .format(unused_options)
138  )
139  return res
140 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
Definition: Traits.h:592
def fbcode_builder.FBCodeBuilder.render (   self,
  steps 
)
Converts nested actions to your builder's expected output format.
Typically takes the output of build().

Definition at line 120 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._options_do_not_access, shell_builder.ShellFBCodeBuilder._render_impl(), docker_builder.DockerFBCodeBuilder._render_impl(), folly.format(), and fbcode_builder.FBCodeBuilder.options_used.

Referenced by fbcode_builder.FBCodeBuilder.render().

120  def render(self, steps):
121  '''
122 
123  Converts nested actions to your builder's expected output format.
124  Typically takes the output of build().
125 
126  '''
127  res = self._render_impl(steps) # Implementation-dependent
128  # Now that the output is rendered, we expect all options to have
129  # been used.
130  unused_options = set(self._options_do_not_access)
131  unused_options -= self.options_used
132  if unused_options:
133  raise RuntimeError(
134  'Unused options: {0} -- please check if you made a typo '
135  'in any of them. Those that are truly not useful should '
136  'be not be set so that this typo detection can be useful.'
137  .format(unused_options)
138  )
139  return res
140 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
Definition: Traits.h:592
def fbcode_builder.FBCodeBuilder.render (   self,
  steps 
)
Converts nested actions to your builder's expected output format.
Typically takes the output of build().

Definition at line 120 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._options_do_not_access, shell_builder.ShellFBCodeBuilder._render_impl(), docker_builder.DockerFBCodeBuilder._render_impl(), folly.format(), fbcode_builder.FBCodeBuilder.options_used, and fbcode_builder.FBCodeBuilder.render().

120  def render(self, steps):
121  '''
122 
123  Converts nested actions to your builder's expected output format.
124  Typically takes the output of build().
125 
126  '''
127  res = self._render_impl(steps) # Implementation-dependent
128  # Now that the output is rendered, we expect all options to have
129  # been used.
130  unused_options = set(self._options_do_not_access)
131  unused_options -= self.options_used
132  if unused_options:
133  raise RuntimeError(
134  'Unused options: {0} -- please check if you made a typo '
135  'in any of them. Those that are truly not useful should '
136  'be not be set so that this typo detection can be useful.'
137  .format(unused_options)
138  )
139  return res
140 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
Definition: Traits.h:592
def fbcode_builder.FBCodeBuilder.render (   self,
  steps 
)
Converts nested actions to your builder's expected output format.
Typically takes the output of build().

Definition at line 120 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder._options_do_not_access, shell_builder.ShellFBCodeBuilder._render_impl(), docker_builder.DockerFBCodeBuilder._render_impl(), folly.format(), fbcode_builder.FBCodeBuilder.options_used, and fbcode_builder.FBCodeBuilder.render().

120  def render(self, steps):
121  '''
122 
123  Converts nested actions to your builder's expected output format.
124  Typically takes the output of build().
125 
126  '''
127  res = self._render_impl(steps) # Implementation-dependent
128  # Now that the output is rendered, we expect all options to have
129  # been used.
130  unused_options = set(self._options_do_not_access)
131  unused_options -= self.options_used
132  if unused_options:
133  raise RuntimeError(
134  'Unused options: {0} -- please check if you made a typo '
135  'in any of them. Those that are truly not useful should '
136  'be not be set so that this typo detection can be useful.'
137  .format(unused_options)
138  )
139  return res
140 
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
Definition: Traits.h:592
def fbcode_builder.FBCodeBuilder.run (   self,
  shell_cmd 
)

Definition at line 167 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.run().

167  def run(self, shell_cmd):
168  'Run this bash command'
169  raise NotImplementedError
170 
def run(self, shell_cmd)
def fbcode_builder.FBCodeBuilder.run (   self,
  shell_cmd 
)

Definition at line 167 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.run().

167  def run(self, shell_cmd):
168  'Run this bash command'
169  raise NotImplementedError
170 
def run(self, shell_cmd)
def fbcode_builder.FBCodeBuilder.run (   self,
  shell_cmd 
)

Definition at line 167 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.run().

167  def run(self, shell_cmd):
168  'Run this bash command'
169  raise NotImplementedError
170 
def run(self, shell_cmd)
def fbcode_builder.FBCodeBuilder.setup (   self)

Definition at line 147 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.setup().

147  def setup(self):
148  'Your builder may want to install packages here.'
149  raise NotImplementedError
150 
def fbcode_builder.FBCodeBuilder.setup (   self)

Definition at line 147 of file fbcode_builder.py.

Referenced by fbcode_builder.FBCodeBuilder.build(), and fbcode_builder.FBCodeBuilder.setup().

147  def setup(self):
148  'Your builder may want to install packages here.'
149  raise NotImplementedError
150 
def fbcode_builder.FBCodeBuilder.setup (   self)

Definition at line 147 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.setup().

147  def setup(self):
148  'Your builder may want to install packages here.'
149  raise NotImplementedError
150 
def fbcode_builder.FBCodeBuilder.setup (   self)

Definition at line 147 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.setup().

147  def setup(self):
148  'Your builder may want to install packages here.'
149  raise NotImplementedError
150 
def fbcode_builder.FBCodeBuilder.step (   self,
  name,
  actions 
)

Definition at line 163 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.step().

163  def step(self, name, actions):
164  'A labeled collection of actions or other steps'
165  raise NotImplementedError
166 
def step(self, name, actions)
def fbcode_builder.FBCodeBuilder.step (   self,
  name,
  actions 
)

Definition at line 163 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.step().

163  def step(self, name, actions):
164  'A labeled collection of actions or other steps'
165  raise NotImplementedError
166 
def step(self, name, actions)
def fbcode_builder.FBCodeBuilder.step (   self,
  name,
  actions 
)
def fbcode_builder.FBCodeBuilder.step (   self,
  name,
  actions 
)

Definition at line 163 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.step().

163  def step(self, name, actions):
164  'A labeled collection of actions or other steps'
165  raise NotImplementedError
166 
def step(self, name, actions)
def fbcode_builder.FBCodeBuilder.workdir (   self,
  dir 
)

Definition at line 171 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.workdir().

171  def workdir(self, dir):
172  'Create this directory if it does not exist, and change into it'
173  raise NotImplementedError
174 
def fbcode_builder.FBCodeBuilder.workdir (   self,
  dir 
)

Definition at line 171 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.workdir().

171  def workdir(self, dir):
172  'Create this directory if it does not exist, and change into it'
173  raise NotImplementedError
174 
def fbcode_builder.FBCodeBuilder.workdir (   self,
  dir 
)

Definition at line 171 of file fbcode_builder.py.

Referenced by fbcode_builder.FBCodeBuilder.github_project_workdir(), and fbcode_builder.FBCodeBuilder.workdir().

171  def workdir(self, dir):
172  'Create this directory if it does not exist, and change into it'
173  raise NotImplementedError
174 
def fbcode_builder.FBCodeBuilder.workdir (   self,
  dir 
)

Definition at line 171 of file fbcode_builder.py.

References fbcode_builder.FBCodeBuilder.workdir().

171  def workdir(self, dir):
172  'Create this directory if it does not exist, and change into it'
173  raise NotImplementedError
174 

Member Data Documentation

fbcode_builder.FBCodeBuilder._github_hashes
private

Definition at line 90 of file fbcode_builder.py.

Referenced by fbcode_builder.FBCodeBuilder.__init__().

fbcode_builder.FBCodeBuilder.options_used

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