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

Unified Diff: blimp/tools/generate-target-manifest.py

Issue 2626423004: Remove all //blimp code. (Closed)
Patch Set: One last(?) `git merge` for good measure. Created 3 years, 11 months 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 | « blimp/tools/fake_web/server.py ('k') | blimp/tools/pylintrc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/tools/generate-target-manifest.py
diff --git a/blimp/tools/generate-target-manifest.py b/blimp/tools/generate-target-manifest.py
deleted file mode 100755
index bf0b56cfe0d3804a09aecfd3b600f61baca02053..0000000000000000000000000000000000000000
--- a/blimp/tools/generate-target-manifest.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2015 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.
-
-'''Generates a list of Blimp target runtime dependencies.'''
-
-import argparse
-import fnmatch
-
-# Returns True if |entry| matches any of the patterns in |blacklist|.
-def IsBlacklisted(entry, blacklist):
- return any([next_pat for next_pat in blacklist
- if fnmatch.fnmatch(entry, next_pat)])
-
-def main():
- parser = argparse.ArgumentParser(description=__doc__)
- parser.add_argument('--runtime-deps-file',
- help=('name and path of runtime deps file, '
- 'if available'),
- required=True,
- metavar='FILE')
- parser.add_argument('--output',
- help=('name and path of manifest file to create '
- '(required)'),
- required=True,
- metavar='FILE')
- parser.add_argument('--blacklist',
- help=('name and path of the blacklist file to use'),
- required=True)
- args = parser.parse_args()
-
- with open(args.runtime_deps_file) as f:
- deps = f.read().splitlines()
-
- header = [
- '# Runtime dependencies for: ' + args.runtime_deps_file,
- '#',
- '# Note: Any unnecessary dependencies should be added to',
- '# the appropriate blacklist and this file should be regenerated.',
- '',
- ]
-
- blacklist_patterns = []
- with open(args.blacklist, 'r') as blacklist_file:
- blacklist_patterns = \
- [entry.partition('#')[0].strip() for entry \
- in blacklist_file.readlines()]
-
- with open(args.output, 'w') as manifest:
- manifest.write('\n'.join(header))
- manifest.write('\n'.join([dep for dep in deps
- if not IsBlacklisted(dep, blacklist_patterns)]))
- manifest.write('\n')
-
-if __name__ == "__main__":
- main()
« no previous file with comments | « blimp/tools/fake_web/server.py ('k') | blimp/tools/pylintrc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698