Pull Linux host tools from cipd
Bug: 118
Change-Id: Ic2d25419c7addd64b87641f2d7254109d059f7af
diff --git a/pw_env_setup/py/pw_env_setup/cipd_setup/pigweed.json b/pw_env_setup/py/pw_env_setup/cipd_setup/pigweed.json
index 4c74874..dbc12b2 100644
--- a/pw_env_setup/py/pw_env_setup/cipd_setup/pigweed.json
+++ b/pw_env_setup/py/pw_env_setup/cipd_setup/pigweed.json
@@ -87,5 +87,12 @@
"tags": [
"version:8.1.0"
]
+ },
+ {
+ "path": "pigweed/host_tools/${os=linux}-${arch=amd64}",
+ "tags": [
+ "git_revision:25527c09720fcc8920f21ee5c93f71ee636ea96a"
+ ],
+ "_comment": "TODO(pwbug/118) Put Windows and Mac host tools in CIPD."
}
]
diff --git a/pw_env_setup/py/pw_env_setup/host_build_setup.py b/pw_env_setup/py/pw_env_setup/host_build_setup.py
index 30f2e38..11c7a0f 100644
--- a/pw_env_setup/py/pw_env_setup/host_build_setup.py
+++ b/pw_env_setup/py/pw_env_setup/host_build_setup.py
@@ -14,11 +14,20 @@
"""Builds and sets up environment to use host build."""
import os
+import platform
import subprocess
def install(pw_root, env):
host_dir = os.path.join(pw_root, 'out', 'host')
+ env.prepend('PATH', os.path.join(host_dir, 'host_tools'))
+
+ if platform.system() == 'Linux':
+ msg = 'skipping host tools setup--got from CIPD'
+ print(msg)
+ env.echo(msg)
+ return
+
with env():
try:
gn_gen = [
@@ -33,5 +42,3 @@
except subprocess.CalledProcessError:
env.echo('warning: host tools failed to build')
-
- env.prepend('PATH', os.path.join(host_dir, 'host_tools'))