diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-10-08 13:23:41 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-10-08 13:23:41 +0200 |
commit | c2e9ff1dd3fc820e5dc7aad1678e124b7fd820ef (patch) | |
tree | ea0b0cf89aeb26bb7022bf51ea9e84346aea4b1c /util | |
parent | 3e9c3bb40484cc5da9b6c520b1d6a825641afd38 (diff) | |
download | mm-common-c2e9ff1dd3fc820e5dc7aad1678e124b7fd820ef.tar.gz |
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.
Diffstat (limited to 'util')
-rwxr-xr-x | util/build_scripts/doc-reference.py | 12 |
1 files 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 |