Bump to python 3

This commit is contained in:
Nils O. Selåsdal
2025-06-27 23:05:46 +02:00
parent d6c3cfb973
commit 22e4bbd2f9
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -11,7 +11,7 @@ version_info = {
'version_revision': revision, 'version_revision': revision,
#version_abi is the abi version of the shared library. Only bump it when #version_abi is the abi version of the shared library. Only bump it when
#backwards compatibility breaks. Strive to not break the ABI. #backwards compatibility breaks. Strive to not break the ABI.
'version_abi': '1.0.0' 'version_abi': '1.0.0'
} }
version_info['version_str'] = "%d.%d.%d.%s" % ( version_info['version_str'] = "%d.%d.%d.%s" % (
version_info['version_major'], version_info['version_major'],
@@ -20,7 +20,7 @@ version_info['version_str'] = "%d.%d.%d.%s" % (
version_info['version_revision']) version_info['version_revision'])
AddOption('--build_type', AddOption('--build_type',
dest = 'build_type', dest = 'build_type',
type = 'choice', type = 'choice',
nargs = 1, nargs = 1,
@@ -80,7 +80,7 @@ test_xml = GetOption('test_xml')
prefix = GetOption('prefix') prefix = GetOption('prefix')
lib_suffix = '' lib_suffix = ''
if not (build_type in ['debug', 'release']): if not (build_type in ['debug', 'release']):
print "Error: expected 'debug' or 'release', found: " + build_type print("Error: expected 'debug' or 'release', found: " + build_type)
Exit(1) Exit(1)
def InstallPerm(env, dest, files, perm): def InstallPerm(env, dest, files, perm):
@@ -93,7 +93,7 @@ def InstallPerm(env, dest, files, perm):
env = Environment(tools = ['default', 'textfile', 'packaging']) env = Environment(tools = ['default', 'textfile', 'packaging'])
#allow shell environment to override compiler #allow shell environment to override compiler
if os.environ.has_key('CC'): if os.environ.get('CC'):
env['CC'] = os.environ['CC'] env['CC'] = os.environ['CC']
env.AddMethod(InstallPerm) env.AddMethod(InstallPerm)
+2 -2
View File
@@ -8,6 +8,6 @@ headers = ucore_env.Glob('ucore/*.h')
#install targets #install targets
ucore_env.Alias('install', ucore_env.Alias('install',
ucore_env.InstallPerm(os.path.join(prefix, 'include', 'ucore'), headers, 0644)) ucore_env.InstallPerm(os.path.join(prefix, 'include', 'ucore'), headers, 0o0644))