| OLD | NEW |
| 1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 # for details. All rights reserved. Use of this source code is governed by a | 2 # for details. All rights reserved. Use of this source code is governed by a |
| 3 # BSD-style license that can be found in the LICENSE file. | 3 # BSD-style license that can be found in the LICENSE file. |
| 4 # | 4 # |
| 5 # This python script creates a version string in a C++ file. | 5 # This python script creates a version string in a C++ file. |
| 6 | 6 |
| 7 import os | 7 import os |
| 8 import pwd | |
| 9 import sys | 8 import sys |
| 10 import subprocess | 9 import subprocess |
| 11 import platform | 10 import platform |
| 12 import getpass | 11 import getpass |
| 13 from os.path import join | 12 from os.path import join |
| 14 import time | 13 import time |
| 15 from optparse import OptionParser | 14 from optparse import OptionParser |
| 16 | 15 |
| 17 def getVersionPart(version_file, part): | 16 def getVersionPart(version_file, part): |
| 18 proc = subprocess.Popen(['awk', | 17 proc = subprocess.Popen(['awk', |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 85 |
| 87 return 0 | 86 return 0 |
| 88 except Exception, inst: | 87 except Exception, inst: |
| 89 sys.stderr.write('make_version.py exception\n') | 88 sys.stderr.write('make_version.py exception\n') |
| 90 sys.stderr.write(str(inst)) | 89 sys.stderr.write(str(inst)) |
| 91 sys.stderr.write('\n') | 90 sys.stderr.write('\n') |
| 92 return -1 | 91 return -1 |
| 93 | 92 |
| 94 if __name__ == '__main__': | 93 if __name__ == '__main__': |
| 95 sys.exit(main(sys.argv)) | 94 sys.exit(main(sys.argv)) |
| OLD | NEW |