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:
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct17
1 files changed, 17 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 29146018704..053f414c954 100644
--- a/SConstruct
+++ b/SConstruct
@@ -361,6 +361,23 @@ if not quickie and do_clean:
print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
Exit()
+
+# ensure python header is found since detection can fail, this could happen
+# 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")
+
+ if not os.path.exists(py_h):
+ print("\nMissing: \"" + env.subst('${BF_PYTHON_INC}') + os.sep + "Python.h\",\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}') + "\"")
+
+ Exit()
+ del py_h
+
+
if not os.path.isdir ( B.root_build_dir):
os.makedirs ( B.root_build_dir )
os.makedirs ( B.root_build_dir + 'source' )