diff options
Diffstat (limited to 'tools/setup.py')
-rwxr-xr-x | tools/setup.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tools/setup.py b/tools/setup.py index b8b9da324..aef65924d 100755 --- a/tools/setup.py +++ b/tools/setup.py @@ -6,8 +6,8 @@ import sys from distutils.spawn import find_executable import argparse import third_party -from util import build_mode, build_path, enable_ansi_colors, run, shell_quote -from util import root_path, third_party_path +from util import build_mode, build_path, enable_ansi_colors, libdeno_path +from util import shell_quote, root_path, run, third_party_path parser = argparse.ArgumentParser() parser.add_argument( @@ -49,15 +49,17 @@ def write_if_not_exists(filename, contents): def write_lastchange(): + lastchange_file = os.path.join(libdeno_path, "build", "util", "LASTCHANGE") + committime_file = lastchange_file + ".committime" write_if_not_exists( - "build/util/LASTCHANGE", + lastchange_file, "LASTCHANGE=c42e4ddbb7973bfb0c57a49ab6bf6dc432baad7e-\n") - write_if_not_exists("build/util/LASTCHANGE.committime", "1535518087") + write_if_not_exists(committime_file, "1535518087") # TODO Properly we should call the following script, but it seems to cause # a rebuild on every commit. # run([ - # sys.executable, "build/util/lastchange.py", "-o", - # "build/util/LASTCHANGE", "--source-dir", root_path, "--filter=" + # sys.executable, "build/util/lastchange.py", "-o", lastchange_file, + # "--source-dir", root_path, "--filter=" # ]) @@ -146,7 +148,7 @@ def gn_exe(): if "DENO_GN_PATH" in os.environ: return os.environ["DENO_GN_PATH"] else: - return os.path.join(third_party_path, "depot_tools", "gn") + return third_party.get_buildtools_tool_path("gn") # gn gen. @@ -175,7 +177,9 @@ def gn_gen(mode): for line in gn_args: print " " + line - run([gn_exe(), "gen", build_path()], env=third_party.google_env()) + run([gn_exe(), "gen", build_path()], + cwd=libdeno_path, + env=third_party.google_env()) if __name__ == '__main__': |