summaryrefslogtreecommitdiff
path: root/tools/setup.py
diff options
context:
space:
mode:
authorChristian Moritz <chrmoritz@gmail.com>2019-09-12 21:07:21 +0200
committerBert Belder <bertbelder@gmail.com>2019-09-15 22:12:12 +0200
commit9c282d6a0eea8404653edb5d61adfe429b05ec18 (patch)
treed9b179e30c1f6a462fa469166c3fdc48d042ac00 /tools/setup.py
parent40a6d830737d51e70e4b4290182452fb7da6e65e (diff)
Move GN root into //core/libdeno (#2943)
Diffstat (limited to 'tools/setup.py')
-rwxr-xr-xtools/setup.py20
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__':