From 46836ee3195fdc8d09a0f03cee13b475b4ff9fc1 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 10 Feb 2016 17:14:54 +0100 Subject: Update gen.py to work on more python versions --- build/msvc/gen.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'build') diff --git a/build/msvc/gen.py b/build/msvc/gen.py index 999710f..cc69a62 100644 --- a/build/msvc/gen.py +++ b/build/msvc/gen.py @@ -1,6 +1,8 @@ from __future__ import print_function import sys import os +import codecs +import six vcppguid = "8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942" # C++ project siguid = "2150E333-8FDC-42A3-9474-1A3956D46DE8" # project group @@ -428,7 +430,10 @@ P_astra["files"].sort() projects = [ P_astra, F_astra_mex, P0, P1, P2, P3, P4, P5, P6, P7, P8 ] -bom = "\xef\xbb\xbf" +if six.PY2: + bom = "\xef\xbb\xbf" +else: + bom = codecs.BOM_UTF8.decode("utf-8") class Configuration: def __init__(self, debug, cuda, x64): -- cgit v1.2.3