| OLD | NEW |
| (Empty) | |
| 1 # Copyright 2017 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # that can be found in the LICENSE file. |
| 4 |
| 5 import argparse |
| 6 import json |
| 7 import sys |
| 8 |
| 9 # Also, import our two VirtualEnv packages. |
| 10 import pants |
| 11 import shirt |
| 12 |
| 13 |
| 14 def main(args): |
| 15 parser = argparse.ArgumentParser() |
| 16 parser.add_argument('--json-output', |
| 17 help='JSON output path.') |
| 18 opts = parser.parse_args(args) |
| 19 |
| 20 manifest = { |
| 21 'interpreter': sys.executable, |
| 22 'pants': pants.__file__, |
| 23 'shirt': shirt.__file__, |
| 24 } |
| 25 |
| 26 if opts.json_output: |
| 27 with open(opts.json_output, 'w') as fd: |
| 28 json.dump(manifest, fd) |
| 29 return 0 |
| 30 |
| 31 if __name__ == '__main__': |
| 32 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |