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

Unified Diff: frog/tip/copy_libs.py

Issue 8889031: move tip to utils so it can be picked up in the SDK (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 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 | « frog/tip/background.html ('k') | frog/tip/create_fftip.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/tip/copy_libs.py
diff --git a/frog/tip/copy_libs.py b/frog/tip/copy_libs.py
deleted file mode 100644
index 10ad6cfe61ebd205e5aa93ad06160c57ebc30fce..0000000000000000000000000000000000000000
--- a/frog/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,
- '../../client/tools/copy_dart.py', os.path.join(TIP_PATH, 'lib')] + libs)
-
-if __name__ == '__main__':
- sys.exit(main())
« no previous file with comments | « frog/tip/background.html ('k') | frog/tip/create_fftip.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698