3 # This helper script is used with the 'test-desert-island' Makefile target.
8 build_out = sys.argv[1]
13 for line in open(build_out, "r"):
14 if mode == "no-downloads":
15 # when setup_requires= uses
16 # misc/dependencies/setuptools-0.6c8.egg, it causes a
17 # "Downloading: misc/dependencies/.." line to be emitted,
18 # which doesn't count as a network download. Lines that start
19 # with "Reading" indicate that it is fetching web pages in
20 # order to check for newer versions of packages. As long as it
21 # doesn't actually download any packages then it still passes
22 # this test. That is: it *would* have succeeded if you were on
23 # a Desert Island, an airplane with no network, behind a
24 # corporate firewall that disallows such connections, or if
25 # you had turned off your network prior to running "python
26 # setup.py build". A stronger requirement would be that it
27 # doesn't even try to check for new packages on remote hosts
28 # if it has all the packages that it needs locally, but we
29 # currently don't enforce that stronger requirement.
30 if (line.startswith("Downloading http:") or
31 line.startswith("Downloading https:")):
35 if mode == "no-downloads":
36 print "Good: build did not try to download any files"
39 if mode == "no-downloads":
40 print "Failed: build tried to download files"