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

Unified Diff: utils/tip/copy_libs.py

Issue 10824150: remove old tip util (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | « utils/tip/background.html ('k') | utils/tip/create_fftip.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tip/copy_libs.py
diff --git a/utils/tip/copy_libs.py b/utils/tip/copy_libs.py
deleted file mode 100644
index 36f05c41d90a224f4bb88d3e37442ffcd069bf4d..0000000000000000000000000000000000000000
--- a/utils/tip/copy_libs.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/local/evn python
-# Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# TODO(jimhug): THIS IS CURRENTLY BROKEN - NEEDS FIX BEFORE EXTENSIONS WORK!
-
-# A script that copies dart/frog/lib under dart/frog/tip/lib/. This script
-# internally uses copy_dart to resolve relative paths used in the libraries and
-# merge source files together.
-
-# Note: The current setup assumes that all libraries used by frog (except some
-# sources) are within the frog/lib. If frog/lib contains a #import outside that
-# directory, we need to update this script to contain a deeper hierarchy of
-# directories.
-
-import os
-import fileinput
-import re
-import subprocess
-import sys
-
-TIP_PATH = os.path.dirname(os.path.abspath(__file__))
-FROG_PATH = os.path.dirname(TIP_PATH)
-LIB_PATH = os.path.join(FROG_PATH, 'lib')
-
-re_library = re.compile(r'^#library\([\'"]([^\'"]*)[\'"]\);$')
-
-def find_libraries(path):
- """ finds .dart files containing the #library directive. """
- libs = []
- for root, dirs, files in os.walk(path):
- for fname in files:
- if fname.endswith('.dart') and not root.endswith('lib/node'):
- relpath = os.path.relpath(os.path.join(root, fname))
- for line in fileinput.input(relpath):
- if re_library.match(line):
- libs.append(relpath)
- break
- fileinput.close()
- return libs
-
-def main():
- os.chdir(LIB_PATH)
- libs = find_libraries(LIB_PATH)
- return subprocess.call([sys.executable,
- '../../tools/copy_dart.py', os.path.join(TIP_PATH, 'lib')] + libs)
-
-if __name__ == '__main__':
- sys.exit(main())
« no previous file with comments | « utils/tip/background.html ('k') | utils/tip/create_fftip.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698