From cb0a5adc562b872c70675a032d85a30438e72192 Mon Sep 17 00:00:00 2001 From: Lawrence D'Oliveiro Date: Tue, 4 Feb 2014 18:55:32 +0100 Subject: SCons: cleaner determination of 32-bit/64-bit builds Try not to be x86-centric, remove unneeded blenderdeps variable. Reviewed By: brecht Differential Revision: https://developer.blender.org/D240 --- build_files/scons/config/Modules/FindPython.py | 3 ++- build_files/scons/tools/Blender.py | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'build_files') diff --git a/build_files/scons/config/Modules/FindPython.py b/build_files/scons/config/Modules/FindPython.py index 03c9d5487d0..f7956e96580 100644 --- a/build_files/scons/config/Modules/FindPython.py +++ b/build_files/scons/config/Modules/FindPython.py @@ -1,4 +1,5 @@ import os +import platform def FindPython(): all_abi_flags = ['m', 'mu', ''] @@ -7,7 +8,7 @@ def FindPython(): abi_flags = "m" # Most common for linux distros version = "3.3" - _arch = "x86_64-linux-gnu" + _arch = platform.uname()[4] + "-linux-gnu" # Determine ABI flags used on this system include = os.path.join(python, "include") diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index ec528c4de96..ac001b5024a 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -15,8 +15,8 @@ to kill any code duplication """ import os -import os.path import string +import ctypes as ct import glob import time import sys @@ -51,10 +51,8 @@ program_list = [] # A list holding Nodes to final binaries, used to create insta arguments = None targets = None resources = [] -bitness = 0 - -#some internals -blenderdeps = [] # don't manipulate this one outside this module! +allowed_bitnesses = {4 : 32, 8 : 64} # only expecting 32-bit or 64-bit +bitness = allowed_bitnesses[ct.sizeof(ct.c_void_p)] ##### LIB STUFF ########## -- cgit v1.2.3