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 'build_files/cmake/project_info.py')
-rwxr-xr-xbuild_files/cmake/project_info.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/build_files/cmake/project_info.py b/build_files/cmake/project_info.py
index 7162b324f94..65afd109302 100755
--- a/build_files/cmake/project_info.py
+++ b/build_files/cmake/project_info.py
@@ -44,7 +44,14 @@ __all__ = (
"project_name_get"
)
+
import sys
+if not sys.version.startswith("3"):
+ print("\nPython3.x needed, found %s.\nAborting!\n" %
+ sys.version.partition(" ")[0])
+ sys.exit(1)
+
+
import os
from os.path import join, dirname, normpath, abspath, splitext, exists
@@ -142,10 +149,11 @@ def cmake_advanced_info():
from xml.dom.minidom import parse
tree = parse(join(CMAKE_DIR, ".cproject"))
- '''
- f = open(".cproject_pretty", 'w')
- f.write(tree.toprettyxml(indent=" ", newl=""))
- '''
+
+ # to check on nicer xml
+ # f = open(".cproject_pretty", 'w')
+ # f.write(tree.toprettyxml(indent=" ", newl=""))
+
ELEMENT_NODE = tree.ELEMENT_NODE
cproject, = tree.getElementsByTagName("cproject")