mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Port some code to Python3
This commit is contained in:
parent
f73370088b
commit
a627dde0d0
24 changed files with 1439 additions and 2341 deletions
6
mach
6
mach
|
@ -6,7 +6,7 @@
|
|||
# The beginning of this script is both valid shell and valid python,
|
||||
# such that the script starts with the shell and is reexecuted with
|
||||
# the right python.
|
||||
''':' && if [ ! -z "$MSYSTEM" ] ; then exec python "$0" "$@" ; else which python2.7 > /dev/null 2> /dev/null && exec python2.7 "$0" "$@" || exec python "$0" "$@" ; fi
|
||||
''':' && if [ ! -z "$MSYSTEM" ] ; then exec python "$0" "$@" ; else which python3 > /dev/null 2> /dev/null && exec python3 "$0" "$@" || exec python "$0" "$@" ; fi
|
||||
'''
|
||||
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
@ -18,8 +18,8 @@ import sys
|
|||
# Check for the current python version as some users (especially on archlinux)
|
||||
# may not have python 2 installed and their /bin/python binary symlinked to
|
||||
# python 3.
|
||||
if sys.version_info >= (3, 0) and sys.version_info < (3, 5):
|
||||
print("mach does not support python 3 (< 3.5), please install python 2 or python 3 (>= 3.5)")
|
||||
if sys.version_info < (3, 5):
|
||||
print("mach does not support python 3 (< 3.5), please install python 3 (>= 3.5)")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue