more python2/3 compat
This commit is contained in:
parent
ea0e4a01ca
commit
0fd9845957
9
wscript
9
wscript
|
@ -183,13 +183,8 @@ V = MAJOR + '.' + MINOR + '.' + MICRO
|
||||||
# can cause odd problems elsewhere. Note that
|
# can cause odd problems elsewhere. Note that
|
||||||
# in python3, encode and decode do not return
|
# in python3, encode and decode do not return
|
||||||
# strings, so we have to force the type.
|
# strings, so we have to force the type.
|
||||||
VERSION = str (V.encode ('ascii', 'ignore'))
|
VERSION = V.encode ('ascii', 'ignore').decode ("utf-8")
|
||||||
PROGRAM_VERSION = str (MAJOR.encode ('ascii', 'ignore'))
|
PROGRAM_VERSION = MAJOR.encode ('ascii', 'ignore').decode ("utf-8")
|
||||||
|
|
||||||
# It seems, that on msys2, with python3, it puts quotes around
|
|
||||||
# the version number, which breaks the build.
|
|
||||||
VERSION = VERSION.replace('\'', '')
|
|
||||||
PROGRAM_VERSION = PROGRAM_VERSION.replace('\'', '')
|
|
||||||
|
|
||||||
if len (sys.argv) > 1 and sys.argv[1] == 'dist':
|
if len (sys.argv) > 1 and sys.argv[1] == 'dist':
|
||||||
if not 'APPNAME' in os.environ:
|
if not 'APPNAME' in os.environ:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user