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:
authorCampbell Barton <ideasman42@gmail.com>2011-07-16 10:55:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-07-16 10:55:45 +0400
commit2d8c1e60e695df3f001f0181bea845a356e14b47 (patch)
tree6ab9083b8d5f409ed476fb6862faf03f35493794 /SConstruct
parent4ca88c99be18651cc96c549afde8dc190120b052 (diff)
print an error message if Python.h can't be found for cmake and scons since its such a common problem.
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' )