Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Verwiebe <info@jensverwiebe.de>2011-08-31 03:52:12 +0400
committerJens Verwiebe <info@jensverwiebe.de>2011-08-31 03:52:12 +0400
commit2457c2134aaef5faec561757ecb1d4afbd1dabcd (patch)
tree6cbd30e89fa9dc6705fdaf3bc2ebe01fb3f841a2 /build_files
parent2883e035c87a4236629d9a89ea0a6e80b525e7d3 (diff)
OSX: additionally choice to link against python-framework again
Diffstat (limited to 'build_files')
-rw-r--r--build_files/scons/config/darwin-config.py30
-rw-r--r--build_files/scons/tools/Blender.py15
2 files changed, 34 insertions, 11 deletions
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py
index 06abaf468dd..c09f326bedf 100644
--- a/build_files/scons/config/darwin-config.py
+++ b/build_files/scons/config/darwin-config.py
@@ -104,14 +104,26 @@ BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg bz2'
#bz2 is a standard osx dynlib
-# python 3.1 uses precompiled libraries in bf svn /lib by default
BF_PYTHON_VERSION = '3.2'
-BF_PYTHON = LIBDIR + '/python'
-BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
-# BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
-BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
-BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}'
-# BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System']
+WITH_BF_STATICPYTHON ='True'
+
+if BF_PYTHON_VERSION=='3.2' and WITH_BF_STATICPYTHON =='True':
+ # python 3.2 uses precompiled libraries in bf svn /lib by default
+
+ BF_PYTHON = LIBDIR + '/python'
+ BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
+ # BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
+ BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
+ BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}'
+ # BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System']
+else:
+ # python 3.2 uses Python-framework additionally installed in /Library/Frameworks
+
+ BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
+ BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERSION}m'
+ BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}'
+ #BF_PYTHON_LIB = ''
+ BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config-3.2m'
WITH_BF_OPENAL = True
#different lib must be used following version of gcc
@@ -315,6 +327,10 @@ if WITH_BF_QUICKTIME:
else:
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
+if WITH_BF_STATICPYTHON == 'False':
+ PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','Python']
+
+
#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':
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 94d09732be7..50486dab591 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -536,7 +536,10 @@ def AppIt(target=None, source=None, env=None):
print("Installing to %s"%(installdir))
# TODO, use tar.
python_zip = 'python_' + osxarch + '.zip' # set specific python_arch.zip
- print("unzipping to app-bundle: %s"%(python_zip))
+ if env['WITH_BF_STATICPYTHON'] == 'True':
+ print("unzipping to app-bundle: %s"%(python_zip))
+ else:
+ print("dynamic build - make sure to have python3.x-framework installed")
bldroot = env.Dir('.').abspath
binary = env['BINARYKIND']
@@ -569,9 +572,13 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'cp %s/release/bin/%s/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary)
commands.getoutput(cmd)
- cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION)
- commands.getoutput(cmd)
- cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
+ if env['WITH_BF_STATICPYTHON'] == 'True':
+ cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(builddir,binary, VERSION)
+ commands.getoutput(cmd)
+ cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,builddir,binary,VERSION)
+ commands.getoutput(cmd)
+
+ cmd = 'cp -R -L %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
if binary == 'blender':#not copy everything for blenderplayer