Commit 7aa4bfde authored by Stefan Behnel's avatar Stefan Behnel

add -3 option to cythonize script to make it easier to compile in Py3 mode

parent 06c2b11d
...@@ -139,6 +139,8 @@ def parse_args(args): ...@@ -139,6 +139,8 @@ def parse_args(args):
parser.add_option('-s', '--option', metavar='NAME=VALUE', dest='options', parser.add_option('-s', '--option', metavar='NAME=VALUE', dest='options',
type=str, action='callback', callback=parse_options, default={}, type=str, action='callback', callback=parse_options, default={},
help='set a cythonize option') help='set a cythonize option')
parser.add_option('-3', dest='python3_mode', action='store_true',
help='use Python 3 syntax mode by default')
parser.add_option('-x', '--exclude', metavar='PATTERN', dest='excludes', parser.add_option('-x', '--exclude', metavar='PATTERN', dest='excludes',
action='append', default=[], action='append', default=[],
...@@ -169,6 +171,8 @@ def parse_args(args): ...@@ -169,6 +171,8 @@ def parse_args(args):
options.build = True options.build = True
if multiprocessing is None: if multiprocessing is None:
options.parallel = 0 options.parallel = 0
if options.python3_mode:
options.options['language_level'] = 3
return options, args return options, args
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment