1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-05 19:55:47 +03:00

fbcode_builder: getdeps: add platform type tuple helper

Summary:
This will feed into the manifest context for system
dependent manifest sections.  This is essentially the same
code borrowed from the watchman and eden getdeps.py.

Reviewed By: simpkins

Differential Revision: D14690997

fbshipit-source-id: 3d3ae146237a2cd49609aaa2bd0e785ebe21f02c
This commit is contained in:
Wez Furlong
2019-05-03 15:52:39 -07:00
committed by Facebook Github Bot
parent ade91cbac9
commit bd620998c4
3 changed files with 150 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ import subprocess
import sys
from getdeps.manifest import ManifestParser
from getdeps.platform import HostType
from getdeps.subcmd import SubCmd, add_subcommands, cmd
@@ -36,6 +37,14 @@ class ValidateManifest(SubCmd):
parser.add_argument("file_name", help="path to the manifest file")
@cmd("show-host-type", "outputs the host type tuple for the host machine")
class ShowHostType(SubCmd):
def run(self, args):
host = HostType()
print("%s" % host.as_tuple_string())
return 0
def build_argparser():
ap = argparse.ArgumentParser(description="Get and build dependencies and projects")
sub = ap.add_subparsers(