Left: | ||
Right: |
OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # This Source Code Form is subject to the terms of the Mozilla Public | 3 # This Source Code Form is subject to the terms of the Mozilla Public |
4 # License, v. 2.0. If a copy of the MPL was not distributed with this | 4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. | 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
6 | 6 |
7 import sys | 7 import sys |
8 import os | 8 import os |
9 import posixpath | 9 import posixpath |
10 import re | 10 import re |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
418 f.truncate() | 418 f.truncate() |
419 for l in file_content: | 419 for l in file_content: |
420 print >>f, l | 420 print >>f, l |
421 | 421 |
422 | 422 |
423 if __name__ == '__main__': | 423 if __name__ == '__main__': |
424 logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) | 424 logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) |
425 | 425 |
426 parser = argparse.ArgumentParser(description='Verify dependencies for a set of repositories, by default the repository of this script.') | 426 parser = argparse.ArgumentParser(description='Verify dependencies for a set of repositories, by default the repository of this script.') |
427 parser.add_argument('repos', metavar='repository', type=str, nargs='*', help ='Repository path') | 427 parser.add_argument('repos', metavar='repository', type=str, nargs='*', help ='Repository path') |
428 parser.add_argument('-q', '--quiet', action='store_true', help='Suppress inf ormational output') | 428 parser.add_argument('-q', '--quiet', action='store_true', help='Suppress inf ormational output') |
tlucas
2017/10/17 12:45:50
The changes in this file are meant to enable tox t
kzar
2017/10/17 13:03:54
Yea I know what you mean, alternative I suppose to
Sebastian Noack
2017/10/17 22:19:06
Any particular reason, to not just call "npm insta
tlucas
2017/10/18 11:23:05
What i had in mind was to have the ensure_npm_depe
| |
429 parser.add_argument( | |
430 '--nodejs-only', | |
431 action='store_true', | |
432 help='Install Node.js production-only dependencies only' | |
433 ) | |
429 args = parser.parse_args() | 434 args = parser.parse_args() |
430 | 435 |
431 if args.quiet: | 436 if args.quiet: |
432 logging.disable(logging.INFO) | 437 logging.disable(logging.INFO) |
433 | 438 |
434 repos = args.repos | 439 if args.nodejs_only: |
435 if not len(repos): | 440 resolve_npm_dependencies('.', get_repo_type('.')) |
436 repos = [os.path.dirname(__file__)] | 441 else: |
437 for repo in repos: | 442 repos = args.repos |
438 resolve_deps(repo) | 443 if not len(repos): |
444 repos = [os.path.dirname(__file__)] | |
445 for repo in repos: | |
446 resolve_deps(repo) | |
OLD | NEW |