diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2012-07-31 18:01:28 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2012-07-31 18:01:28 +0400 |
commit | 966d54d07df02c72b6c94e0e6e7c07c10d20389a (patch) | |
tree | 0133de4c4681eaa6d6d6a5a38852779b9f39fcde /build_files/scons | |
parent | ff8441dcd7a248df9e3562971f9d25fd4c22a973 (diff) | |
parent | e7e7972cd6b9bc22b4378b19db0b796ffd56fbb8 (diff) |
merge with trunk 49411
Diffstat (limited to 'build_files/scons')
-rw-r--r-- | build_files/scons/config/darwin-config.py | 16 | ||||
-rw-r--r-- | build_files/scons/tools/Blender.py | 14 | ||||
-rw-r--r-- | build_files/scons/tools/btools.py | 3 |
3 files changed, 28 insertions, 5 deletions
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py index 2ce6fd29989..03e722b4bf8 100644 --- a/build_files/scons/config/darwin-config.py +++ b/build_files/scons/config/darwin-config.py @@ -32,6 +32,8 @@ elif cmd_res[:2]=='10': MAC_CUR_VER='10.6' elif cmd_res[:2]=='11': MAC_CUR_VER='10.7' +elif cmd_res[:2]=='12': + MAC_CUR_VER='10.8' cmd = 'xcodebuild -version' cmd_xcode=commands.getoutput(cmd) XCODE_CUR_VER=cmd_xcode[6:][:3] # truncate output to major.minor version @@ -75,7 +77,7 @@ else : LCGDIR = '#../lib/darwin-9.x.universal' CC = 'gcc-4.2' CXX = 'g++-4.2' - else: + elif 'Mac OS X 10.6' in MACOSX_SDK_CHECK: # OSX 10.6/7 with Xcode 4.x MAC_MIN_VERS = '10.6' MACOSX_DEPLOYMENT_TARGET = '10.6' @@ -83,6 +85,14 @@ else : LCGDIR = '#../lib/darwin-9.x.universal' CC = 'gcc-4.2' CXX = 'g++-4.2' + else: + # OSX 10.8 with Xcode 4.4 and higher (no 10.6sdk! ) + MAC_MIN_VERS = '10.6' + MACOSX_DEPLOYMENT_TARGET = '10.6' + MACOSX_SDK='/Developer/SDKs/MacOSX10.7.sdk' + LCGDIR = '#../lib/darwin-9.x.universal' + CC = 'gcc' + CXX = 'g++' LIBDIR = '${LCGDIR}' @@ -337,8 +347,8 @@ if not WITH_OSX_STATICPYTHON: #note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4 -#for 10.7.sdk, SystemStubs needs to be excluded (lib doesn't exist anymore) -if MACOSX_DEPLOYMENT_TARGET == '10.7': +#for > 10.7.sdk, SystemStubs needs to be excluded (lib doesn't exist anymore) +if MACOSX_SDK.endswith("10.7.sdk") or MACOSX_SDK.endswith("10.8.sdk"): LLIBS = ['stdc++'] else: LLIBS = ['stdc++', 'SystemStubs'] diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index 0c5d37f77fe..e07c0d6f0de 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -693,11 +693,23 @@ def UnixPyBundle(target=None, source=None, env=None): run("rm -r '%s/turtle.py'" % py_target) run("rm -f '%s/lib-dynload/_tkinter.so'" % py_target) + if env['WITH_BF_PYTHON_INSTALL_NUMPY']: + numpy_src = py_src + "/site-packages/numpy" + numpy_target = py_target + "/site-packages/numpy" + + if os.path.exists(numpy_src): + print 'Install numpy from:' + print '\t"%s" into...' % numpy_src + print '\t"%s"\n' % numpy_target + + run("cp -R '%s' '%s'" % (numpy_src, os.path.dirname(numpy_target))) + else: + print 'Failed to find numpy at %s, skipping copying' % numpy_src + run("find '%s' -type d -name 'test' -prune -exec rm -rf {} ';'" % py_target) run("find '%s' -type d -name '__pycache__' -exec rm -rf {} ';'" % py_target) run("find '%s' -name '*.py[co]' -exec rm -rf {} ';'" % py_target) run("find '%s' -name '*.so' -exec strip -s {} ';'" % py_target) - #### END ACTION STUFF ######### diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index 3e72a989e95..53c1af139cd 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -137,7 +137,7 @@ def validate_arguments(args, bc): 'BF_CXX', 'WITH_BF_STATICCXX', 'BF_CXX_LIB_STATIC', 'BF_TWEAK_MODE', 'BF_SPLIT_SRC', 'WITHOUT_BF_INSTALL', - 'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_PYTHON_UNPACK', + 'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_PYTHON_UNPACK', 'WITH_BF_PYTHON_INSTALL_NUMPY' 'WITHOUT_BF_OVERWRITE_INSTALL', 'WITH_BF_OPENMP', 'BF_OPENMP', 'BF_OPENMP_LIBPATH', 'WITH_GHOST_COCOA', @@ -525,6 +525,7 @@ def read_opts(env, cfg, args): (BoolVariable('BF_SPLIT_SRC', 'Split src lib into several chunks if true', False)), (BoolVariable('WITHOUT_BF_INSTALL', 'dont install if true', False)), (BoolVariable('WITHOUT_BF_PYTHON_INSTALL', 'dont install Python modules if true', False)), + (BoolVariable('WITH_BF_PYTHON_INSTALL_NUMPY', 'install Python mumpy module', False)), (BoolVariable('WITHOUT_BF_PYTHON_UNPACK', 'dont remove and unpack Python modules everytime if true', False)), (BoolVariable('WITHOUT_BF_OVERWRITE_INSTALL', 'dont remove existing files before breating the new install directory (set to False when making packages for others)', False)), (BoolVariable('BF_FANCY', 'Enable fancy output if true', True)), |