[mm-common/wip/kjellahl/meson-build] util/build_scripts/doc-reference.py: Don't use feature from Python 3.7
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mm-common/wip/kjellahl/meson-build] util/build_scripts/doc-reference.py: Don't use feature from Python 3.7
- Date: Tue, 8 Oct 2019 11:25:49 +0000 (UTC)
commit c2e9ff1dd3fc820e5dc7aad1678e124b7fd820ef
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Tue Oct 8 13:23:41 2019 +0200
util/build_scripts/doc-reference.py: Don't use feature from Python 3.7
Don't use text=True in subprocess.run(). It does not exist in Python 3.5
which is the Python version that mm-common requires.
util/build_scripts/doc-reference.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/util/build_scripts/doc-reference.py b/util/build_scripts/doc-reference.py
index c3d16b7..c798d48 100755
--- a/util/build_scripts/doc-reference.py
+++ b/util/build_scripts/doc-reference.py
@@ -38,14 +38,16 @@ def doxygen():
# Relative paths in Doxyfile assume that Doxygen is run from the
# build directory one level above Doxyfile.
doxygen_cwd = os.path.join(doc_outdir, '..')
- DOXYGEN = 'doxygen'
- if ('DOXYGEN' in child_env) and child_env['DOXYGEN']:
- DOXYGEN = child_env['DOXYGEN']
+ DOXYGEN = child_env.get('DOXYGEN', None)
+ if not DOXYGEN:
+ DOXYGEN = 'doxygen'
doxygen_input = '@INCLUDE = ' + os.path.join('reference', 'Doxyfile') + '\n' \
+ 'INPUT = "' + '" "'.join(sys.argv[4:]) + '"\n'
- result = subprocess.run([DOXYGEN, '-'],
- input=doxygen_input, text=True, env=child_env, cwd=doxygen_cwd)
+ # (Starting with Python 3.7 text=True is a more understandable equivalent to
+ # universal_newlines=True. Let's use only features in Python 3.5.)
+ result = subprocess.run([DOXYGEN, '-'], input=doxygen_input,
+ universal_newlines=True, env=child_env, cwd=doxygen_cwd)
if result.returncode:
return result.returncode
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]