|
@@ -21,24 +21,24 @@ def build_web():
|
|
|
print("Attempting to build webpage...")
|
|
print("Attempting to build webpage...")
|
|
|
try:
|
|
try:
|
|
|
if platform.system() == "Windows":
|
|
if platform.system() == "Windows":
|
|
|
- print check_output(["npm.cmd", "install", "--only=dev"])
|
|
|
|
|
- print check_output(["node_modules\\.bin\\gulp.cmd"])
|
|
|
|
|
|
|
+ print(check_output(["npm.cmd", "install", "--only=dev"]))
|
|
|
|
|
+ print(check_output(["node_modules\\.bin\\gulp.cmd"]))
|
|
|
else:
|
|
else:
|
|
|
- print check_output(["npm", "install"])
|
|
|
|
|
- print check_output(["node_modules/.bin/gulp"])
|
|
|
|
|
|
|
+ print(check_output(["npm", "install"]))
|
|
|
|
|
+ print(check_output(["node_modules/.bin/gulp"]))
|
|
|
copyfile("build/index.html.gz.h", "../dist/index.html.gz.h")
|
|
copyfile("build/index.html.gz.h", "../dist/index.html.gz.h")
|
|
|
except OSError as e:
|
|
except OSError as e:
|
|
|
- print "Encountered error OSError building webpage:", e
|
|
|
|
|
|
|
+ print("Encountered error OSError building webpage:", e)
|
|
|
if e.filename:
|
|
if e.filename:
|
|
|
- print "Filename is", e.filename
|
|
|
|
|
- print "WARNING: Failed to build web package. Using pre-built page."
|
|
|
|
|
|
|
+ print("Filename is", e.filename)
|
|
|
|
|
+ print("WARNING: Failed to build web package. Using pre-built page.")
|
|
|
except CalledProcessError as e:
|
|
except CalledProcessError as e:
|
|
|
- print e.output
|
|
|
|
|
- print "Encountered error CalledProcessError building webpage:", e
|
|
|
|
|
- print "WARNING: Failed to build web package. Using pre-built page."
|
|
|
|
|
|
|
+ print(e.output)
|
|
|
|
|
+ print("Encountered error CalledProcessError building webpage:", e)
|
|
|
|
|
+ print("WARNING: Failed to build web package. Using pre-built page.")
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
- print "Encountered error", type(e).__name__, "building webpage:", e
|
|
|
|
|
- print "WARNING: Failed to build web package. Using pre-built page."
|
|
|
|
|
|
|
+ print("Encountered error", type(e).__name__, "building webpage:", e)
|
|
|
|
|
+ print("WARNING: Failed to build web package. Using pre-built page.")
|
|
|
finally:
|
|
finally:
|
|
|
os.chdir("..");
|
|
os.chdir("..");
|
|
|
|
|
|