Create mock pub links for all packages under pkg, not a hard-coded list

Review URL: https://codereview.chromium.org//11444015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15811 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
alanknight@google.com 2012-12-06 22:09:34 +00:00
parent f5c4d7a381
commit a6c56f84cb
2 changed files with 18 additions and 9 deletions

View file

@ -11,15 +11,7 @@
{
'action_name': 'make_pkg_packages',
'inputs': [
'../tools/make_links.py',
'args/lib',
'fixnum/lib',
'http/lib',
'intl/lib',
'logging/lib',
'meta/lib',
'unittest/lib',
'webdriver/lib',
'<!@(["python", "../tools/list_pkg_directories.py"])',
],
'outputs': [
'<(PRODUCT_DIR)/packages',

View file

@ -0,0 +1,17 @@
#!/usr/bin/env python
# Copyright (c) 2012, 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.
'''Tool for listing the directories under pkg, with their lib directories.
Used in pkg.gyp. Lists all of the directories in the current directory
which have a lib subdirectory.
Usage:
python tools/list_pkg_directories.py
'''
import os
paths = map(lambda x: x + '/lib', filter(os.path.isdir, os.listdir('.')))
filter(lambda x: os.path.exists(x), paths)