diff options
author | JosepMaJAZ <josepma@gmail.com> | 2020-04-18 19:41:37 +0200 |
---|---|---|
committer | JosepMaJAZ <josepma@gmail.com> | 2020-04-18 19:41:37 +0200 |
commit | 90a639a5ef6c67b79a066584038a040f45f64166 (patch) | |
tree | 3f9502745ba34be5157de1bd514fbca1b62f21c6 | |
parent | 9adf8a97abb12673b85dbd3338cc215e65c06549 (diff) |
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)
-rw-r--r-- | build/qt5.py | 3 | ||||
-rw-r--r-- | build/util.py | 2 |
2 files changed, 3 insertions, 2 deletions
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(): |