Modernize SConstruct to make it Python 3 compatible

This commit is contained in:
Anatoli Babenia 2020-09-05 12:48:41 +03:00
parent ec5852b176
commit e22a6b4860
1 changed files with 5 additions and 3 deletions

View File

@ -1,10 +1,12 @@
# Setup
from __future__ import absolute_import
from __future__ import print_function
import os
env = Environment(ENV = os.environ)
try:
env.Tool('config', toolpath = [os.environ.get('CBANG_HOME')])
except Exception, e:
raise Exception, 'CBANG_HOME not set?\n' + str(e)
except Exception as e:
raise Exception('CBANG_HOME not set?\n' + str(e))
env.CBLoadTools('packager run_distutils osx fah-client-version')
env.CBAddVariables(
@ -14,7 +16,7 @@ conf = env.CBConfigure()
# Version
try:
version = env.FAHClientVersion()
except Exception, e:
except Exception as e:
print(e)
version = '0.0.0'
env.Replace(PACKAGE_VERSION = version)