mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
4e9e46b9f8
commit
c5d03d338e
|
@ -16,6 +16,10 @@ if os.path.exists("waf"):
|
||||||
print("Found 'waf', skipping download.")
|
print("Found 'waf', skipping download.")
|
||||||
sys.exit(0)
|
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:
|
try:
|
||||||
from urllib.request import urlopen, URLError
|
from urllib.request import urlopen, URLError
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in New Issue