Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: tools/data_pack/scons.py

Issue 5535003: scons: excise more scons references from the code base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/code_coverage/coverage_posix.py ('k') | tools/export_tarball/export_tarball.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/data_pack/scons.py
diff --git a/tools/data_pack/scons.py b/tools/data_pack/scons.py
deleted file mode 100644
index 6bd2d31392b6bb461c4d7da815c6ddafda011ebc..0000000000000000000000000000000000000000
--- a/tools/data_pack/scons.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-def _SConsNodeToFile(file_node):
- '''Convert a scons file Node object to a path on disk.'''
- return str(file_node.rfile())
-
-
-def _Build(target, source, env):
- '''Run the repack script.'''
- data_pack_root_dir = env.subst('$CHROME_SRC_DIR/tools/data_pack')
- sys.path.append(data_pack_root_dir)
- import repack
- sources = [_SConsNodeToFile(s) for s in source]
- repack.RePack(_SConsNodeToFile(target[0]), sources)
-
-
-def _BuildStr(targets, sources, env):
- '''This message gets printed each time the builder runs.'''
- return "Repacking data files into %s" % str(targets[0].rfile())
-
-
-def _Scanner(file_node, env, path):
- '''Repack files if repack.py or data_pack.py have changed.'''
- data_pack_root_dir = env.subst('$CHROME_SRC_DIR/tools/data_pack')
-
- files = []
- for f in ('repack.py', 'data_pack.py'):
- files.append(os.path.join(data_pack_root_dir, f))
- return files
-
-
-#############################################################################
-## SCons Tool api methods below.
-def generate(env):
- action = env.Action(_Build, _BuildStr)
- scanner = env.Scanner(function=_Scanner, skeys=['.pak'])
-
- builder = env.Builder(action=action,
- source_scanner=scanner,
- src_suffix='.pak')
-
- # add our builder and scanner to the environment
- env.Append(BUILDERS = {'Repack': builder})
-
-
-# Function name is mandated by newer versions of SCons.
-def exists(env):
- return 1
« no previous file with comments | « tools/code_coverage/coverage_posix.py ('k') | tools/export_tarball/export_tarball.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698