From 90a639a5ef6c67b79a066584038a040f45f64166 Mon Sep 17 00:00:00 2001 From: JosepMaJAZ Date: Sat, 18 Apr 2020 19:41:37 +0200 Subject: Fixes to allow Scons build to work with python 3 on windows. (we are moving away from scons to cmake, but while we're not on 2.4, we might maintain this compatibility) --- build/qt5.py | 3 ++- build/util.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'build') diff --git a/build/qt5.py b/build/qt5.py index 092c2bca3c..9a4aa73f04 100644 --- a/build/qt5.py +++ b/build/qt5.py @@ -208,7 +208,8 @@ class _Automoc: # Now, check whether the corresponding CPP file # includes the moc'ed output directly... - inc_moc_cpp = r'^\s*#\s*include\s+"%s"' % str(moc_cpp[0]) + inc_path_removed = os.path.split(str(moc_cpp[0]))[1] + inc_moc_cpp = r'^\s*#\s*include\s+"%s"' % inc_path_removed if cpp and re.search(inc_moc_cpp, cpp_contents, re.M): if moc_options['debug']: print("scons: qt5: CXX file '%s' directly includes the moc'ed output '%s', no compiling required" % (str(cpp), str(moc_cpp))) diff --git a/build/util.py b/build/util.py index 6c8c7a7d12..ce547688b2 100644 --- a/build/util.py +++ b/build/util.py @@ -71,7 +71,7 @@ def export_source(source, dest): def get_git_revision(): - return len(os.popen("git log --pretty=oneline --first-parent").read().splitlines()) + return os.popen("git rev-list HEAD --first-parent --count").read().strip() def get_git_modified(): -- cgit v1.2.3