summaryrefslogtreecommitdiff
path: root/gr-utils/python/modtool/cmakefile_editor.py
diff options
context:
space:
mode:
authorMarcus Müller <marcus@hostalia.de>2018-06-25 19:28:29 +0200
committerMarcus Müller <marcus@hostalia.de>2018-06-25 19:28:29 +0200
commit03ae7938351f01313d30a41927ffb77670fcca14 (patch)
tree586744f0e2b7560dc161f2a7a60030155d43ce8a /gr-utils/python/modtool/cmakefile_editor.py
parentd78f7fcd0dadd362fcdc99194da5343a506eb519 (diff)
parentc66aec4dfae559004e88da968d1ce57584e144ee (diff)
Merge branch 'next_python3' into next
This brings Python3 to `next`. It also brings * a bump in SWIG dependency version * various GRC improvements, * YAML instead of XML in GRC * a lot of broken unit tests
Diffstat (limited to 'gr-utils/python/modtool/cmakefile_editor.py')
-rw-r--r--gr-utils/python/modtool/cmakefile_editor.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gr-utils/python/modtool/cmakefile_editor.py b/gr-utils/python/modtool/cmakefile_editor.py
index 4148ad1960..1b644287f9 100644
--- a/gr-utils/python/modtool/cmakefile_editor.py
+++ b/gr-utils/python/modtool/cmakefile_editor.py
@@ -20,6 +20,9 @@
#
""" Edit CMakeLists.txt files """
+from __future__ import print_function
+from __future__ import unicode_literals
+
import re
class CMakeFileEditor(object):
@@ -126,9 +129,9 @@ class CMakeFileEditor(object):
comment_out_re = r'\n' + self.indent + comment_out_re
(self.cfile, nsubs) = re.subn(r'(\b'+fname+r'\b)\s*', comment_out_re, self.cfile)
if nsubs == 0:
- print "Warning: A replacement failed when commenting out %s. Check the CMakeFile.txt manually." % fname
+ print("Warning: A replacement failed when commenting out %s. Check the CMakeFile.txt manually." % fname)
elif nsubs > 1:
- print "Warning: Replaced %s %d times (instead of once). Check the CMakeFile.txt manually." % (fname, nsubs)
+ print("Warning: Replaced %s %d times (instead of once). Check the CMakeFile.txt manually." % (fname, nsubs))
def comment_out_lines(self, pattern, comment_str='#'):
""" Comments out all lines that match with pattern """