mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-08 18:02:05 +03:00
Add annotations to opensource/fbcode_builder
Reviewed By: shannonzhu Differential Revision: D34357770 fbshipit-source-id: fde97212d0e0cbd203e094486f3620205d861faa
This commit is contained in:

committed by
Facebook GitHub Bot
parent
6f5c74656b
commit
6933945fd5
@@ -64,7 +64,7 @@ class BuilderBase(object):
|
|||||||
env=None,
|
env=None,
|
||||||
use_cmd_prefix: bool = True,
|
use_cmd_prefix: bool = True,
|
||||||
allow_fail: bool = False,
|
allow_fail: bool = False,
|
||||||
):
|
) -> int:
|
||||||
if env:
|
if env:
|
||||||
e = self.env.copy()
|
e = self.env.copy()
|
||||||
e.update(env)
|
e.update(env)
|
||||||
@@ -86,19 +86,19 @@ class BuilderBase(object):
|
|||||||
allow_fail=allow_fail,
|
allow_fail=allow_fail,
|
||||||
)
|
)
|
||||||
|
|
||||||
def _reconfigure(self, reconfigure) -> bool:
|
def _reconfigure(self, reconfigure: bool) -> bool:
|
||||||
if self.build_dir is not None:
|
if self.build_dir is not None:
|
||||||
if not os.path.isdir(self.build_dir):
|
if not os.path.isdir(self.build_dir):
|
||||||
os.makedirs(self.build_dir)
|
os.makedirs(self.build_dir)
|
||||||
reconfigure = True
|
reconfigure = True
|
||||||
return reconfigure
|
return reconfigure
|
||||||
|
|
||||||
def prepare(self, install_dirs, reconfigure) -> None:
|
def prepare(self, install_dirs, reconfigure: bool) -> None:
|
||||||
print("Preparing %s..." % self.manifest.name)
|
print("Preparing %s..." % self.manifest.name)
|
||||||
reconfigure = self._reconfigure(reconfigure)
|
reconfigure = self._reconfigure(reconfigure)
|
||||||
self._prepare(install_dirs=install_dirs, reconfigure=reconfigure)
|
self._prepare(install_dirs=install_dirs, reconfigure=reconfigure)
|
||||||
|
|
||||||
def build(self, install_dirs, reconfigure) -> None:
|
def build(self, install_dirs, reconfigure: bool) -> None:
|
||||||
print("Building %s..." % self.manifest.name)
|
print("Building %s..." % self.manifest.name)
|
||||||
reconfigure = self._reconfigure(reconfigure)
|
reconfigure = self._reconfigure(reconfigure)
|
||||||
self._prepare(install_dirs=install_dirs, reconfigure=reconfigure)
|
self._prepare(install_dirs=install_dirs, reconfigure=reconfigure)
|
||||||
|
@@ -158,7 +158,7 @@ def tpx_path() -> str:
|
|||||||
return "xplat/testinfra/tpx/ctp.tpx"
|
return "xplat/testinfra/tpx/ctp.tpx"
|
||||||
|
|
||||||
|
|
||||||
def path_search(env, exename, defval=None):
|
def path_search(env, exename: str, defval=None):
|
||||||
"""Search for exename in the PATH specified in env.
|
"""Search for exename in the PATH specified in env.
|
||||||
exename is eg: `ninja` and this function knows to append a .exe
|
exename is eg: `ninja` and this function knows to append a .exe
|
||||||
to the end on windows.
|
to the end on windows.
|
||||||
|
Reference in New Issue
Block a user