Skip to content

Commit c436a3f

Browse files
authored
Merge pull request #151 from ahoppen/pr/python3
Update build-script-helper.py to Python 3
2 parents 7efd438 + 7adf2b1 commit c436a3f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Utilities/build-script-helper.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#!/usr/bin/env python
2-
3-
from __future__ import print_function
1+
#!/usr/bin/env python3
42

53
import argparse
64
import os
@@ -93,7 +91,10 @@ def add_common_args(parser):
9391
parser.add_argument('--sanitize-all', action='store_true', help='build using every available sanitizer in sub-directories of build path')
9492
parser.add_argument('--verbose', '-v', action='store_true', help='enable verbose output')
9593

96-
subparsers = parser.add_subparsers(title='subcommands', dest='action', metavar='action')
94+
if sys.version_info >= (3,7,0):
95+
subparsers = parser.add_subparsers(title='subcommands', dest='action', required=True, metavar='action')
96+
else:
97+
subparsers = parser.add_subparsers(title='subcommands', dest='action', metavar='action')
9798
build_parser = subparsers.add_parser('build', help='build the package')
9899
add_common_args(build_parser)
99100

Utilities/import-llvm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
# This is a helper script for importing the things we use from LLVM.
44
#

0 commit comments

Comments
 (0)