scons: test whether python is 64bit enabled
This commit is contained in:
parent
88e1e30d9f
commit
f2da944c29
1 changed files with 12 additions and 1 deletions
13
SConstruct
13
SConstruct
|
@ -398,7 +398,8 @@ pickle_store = [# Scons internal variables
|
||||||
'HAS_CAIRO',
|
'HAS_CAIRO',
|
||||||
'HAS_PYCAIRO',
|
'HAS_PYCAIRO',
|
||||||
'HAS_LIBXML2',
|
'HAS_LIBXML2',
|
||||||
'LIBTOOL_SUPPORTS_ADVISE'
|
'LIBTOOL_SUPPORTS_ADVISE',
|
||||||
|
'PYTHON_IS_64BIT'
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add all other user configurable options to pickle pickle_store
|
# Add all other user configurable options to pickle pickle_store
|
||||||
|
@ -1212,6 +1213,16 @@ if not preconfigured:
|
||||||
else:
|
else:
|
||||||
env['PYTHON_INSTALL_LOCATION'] = env['DESTDIR'] + '/' + env['PYTHON_SITE_PACKAGES']
|
env['PYTHON_INSTALL_LOCATION'] = env['DESTDIR'] + '/' + env['PYTHON_SITE_PACKAGES']
|
||||||
|
|
||||||
|
if py3:
|
||||||
|
is_64_bit = '''%s -c "import sys; print(sys.maxsize == 9223372036854775807)"''' % env['PYTHON']
|
||||||
|
else:
|
||||||
|
is_64_bit = '''%s -c "import sys; print sys.maxint == 9223372036854775807"''' % env['PYTHON']
|
||||||
|
|
||||||
|
if is_64_bit:
|
||||||
|
env['PYTHON_IS_64BIT'] = True
|
||||||
|
else:
|
||||||
|
env['PYTHON_IS_64BIT'] = False
|
||||||
|
|
||||||
majver, minver = env['PYTHON_VERSION'].split('.')
|
majver, minver = env['PYTHON_VERSION'].split('.')
|
||||||
|
|
||||||
# we don't want the includes it in the main environment...
|
# we don't want the includes it in the main environment...
|
||||||
|
|
Loading…
Reference in a new issue