[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52153] trunk/blender: Fix to allow several include dirs for python under scons build system ( needed with new py3.3 debian-like packages).
Bastien Montagne
montagne29 at wanadoo.fr
Mon Nov 12 19:31:16 CET 2012
Revision: 52153
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52153
Author: mont29
Date: 2012-11-12 18:31:15 +0000 (Mon, 12 Nov 2012)
Log Message:
-----------
Fix to allow several include dirs for python under scons build system (needed with new py3.3 debian-like packages).
Modified Paths:
--------------
trunk/blender/SConstruct
trunk/blender/intern/cycles/SConscript
trunk/blender/intern/locale/SConscript
Modified: trunk/blender/SConstruct
===================================================================
--- trunk/blender/SConstruct 2012-11-12 18:07:33 UTC (rev 52152)
+++ trunk/blender/SConstruct 2012-11-12 18:31:15 UTC (rev 52153)
@@ -422,16 +422,22 @@
# with _any_ library but since we used a fixed python version this tends to
# be most problematic.
if env['WITH_BF_PYTHON']:
- py_h = os.path.join(Dir(env.subst('${BF_PYTHON_INC}')).abspath, "Python.h")
+ found_python_h = found_pyconfig_h = False
+ for bf_python_inc in env.subst('${BF_PYTHON_INC}').split():
+ py_h = os.path.join(Dir(bf_python_inc).abspath, "Python.h")
+ if os.path.exists(py_h):
+ found_python_h = True
+ py_h = os.path.join(Dir(bf_python_inc).abspath, "pyconfig.h")
+ if os.path.exists(py_h):
+ found_pyconfig_h = True
- if not os.path.exists(py_h):
- print("\nMissing: \"" + env.subst('${BF_PYTHON_INC}') + os.sep + "Python.h\",\n"
+ if not (found_python_h and found_pyconfig_h):
+ print("\nMissing: Python.h and/or pyconfig.h in\"" + env.subst('${BF_PYTHON_INC}') + "\",\n"
" Set 'BF_PYTHON_INC' to point "
- "to a valid python include path.\n Containing "
- "Python.h for python version \"" + env.subst('${BF_PYTHON_VERSION}') + "\"")
+ "to valid python include path(s).\n Containing "
+ "Python.h and pyconfig.h for python version \"" + env.subst('${BF_PYTHON_VERSION}') + "\"")
Exit()
- del py_h
if not os.path.isdir ( B.root_build_dir):
Modified: trunk/blender/intern/cycles/SConscript
===================================================================
--- trunk/blender/intern/cycles/SConscript 2012-11-12 18:07:33 UTC (rev 52152)
+++ trunk/blender/intern/cycles/SConscript 2012-11-12 18:31:15 UTC (rev 52153)
@@ -32,7 +32,7 @@
incs.extend('#extern/glew/include #intern/mikktspace'.split())
incs.append(cycles['BF_OIIO_INC'])
incs.append(cycles['BF_BOOST_INC'])
-incs.append(cycles['BF_PYTHON_INC'])
+incs.extend(cycles['BF_PYTHON_INC'].split())
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
cxxflags.append('-D_CRT_SECURE_NO_WARNINGS /fp:fast /EHsc'.split())
Modified: trunk/blender/intern/locale/SConscript
===================================================================
--- trunk/blender/intern/locale/SConscript 2012-11-12 18:07:33 UTC (rev 52152)
+++ trunk/blender/intern/locale/SConscript 2012-11-12 18:31:15 UTC (rev 52153)
@@ -11,4 +11,4 @@
defs.append('WITH_INTERNATIONAL')
incs += ' ' + env['BF_BOOST_INC']
-env.BlenderLib( 'bf_intern_locale', sources, Split(incs), defs, libtype=['extern','player'], priority=[10, 185])
+env.BlenderLib( 'bf_intern_locale', sources, Split(incs), defs, libtype=['intern','player'], priority=[10, 185])
More information about the Bf-blender-cvs
mailing list