From c5d03d338ecd46d7170733822c37da4be027296f Mon Sep 17 00:00:00 2001 From: Philip Sequeira Date: Tue, 10 Jul 2018 22:15:19 -0400 Subject: build: add --no-download option to bootstrap.py With this option, the script will check that the expected waf version is present, but will simply fail if it's not, rather than trying to download it. This allows a package build script to avoid compile-time network access but still ensure it's using the right waf version. --- bootstrap.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bootstrap.py') diff --git a/bootstrap.py b/bootstrap.py index 2e304545cc..9df0761df6 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -16,6 +16,10 @@ if os.path.exists("waf"): print("Found 'waf', skipping download.") sys.exit(0) +if "--no-download" in sys.argv[1:]: + print("Did not find {} and no download was requested.".format(WAFRELEASE)) + sys.exit(1) + try: from urllib.request import urlopen, URLError except: -- cgit v1.2.3