summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Sequeira <phsequei@gmail.com>2018-07-10 22:15:19 -0400
committersfan5 <sfan5@live.de>2018-08-13 19:09:35 +0200
commitc5d03d338ecd46d7170733822c37da4be027296f (patch)
tree349575625b055c00bb74737b5a51efcb2f488ec2
parent4e9e46b9f8871f46de3e1a192cbcb02d54ba0d52 (diff)
downloadmpv-c5d03d338ecd46d7170733822c37da4be027296f.tar.bz2
mpv-c5d03d338ecd46d7170733822c37da4be027296f.tar.xz
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.
-rwxr-xr-xbootstrap.py4
1 files changed, 4 insertions, 0 deletions
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: