Changeset 139048 in webkit
- Timestamp:
- Jan 8, 2013 2:10:24 AM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r139039 r139048 1 2013-01-08 Zan Dobersek <zandobersek@gmail.com> 2 3 [GTK] Make Tools/gtk/generate-gtkdoc compatible with Python 3 4 https://bugs.webkit.org/show_bug.cgi?id=106195 5 6 Reviewed by Philippe Normand. 7 8 Perform changes in the generate-gtkdoc script and common and gtkdoc modules 9 to make the Python code compatible with Python 3. This includes modifying 10 print statements, exception handling, dictionary iteration and 11 byte-sequence-to-string conversion. 12 13 * gtk/common.py: 14 (get_build_path): 15 (pkg_config_file_variable): 16 (gtk_version_of_pkg_config_file): 17 * gtk/generate-gtkdoc: 18 (print_missing_api): 19 * gtk/gtkdoc.py: 20 (GTKDoc.__init__): 21 (GTKDoc._run_command): 22 1 23 2013-01-02 Steve Block <steveblock@chromium.org> 2 24 -
trunk/Tools/gtk/common.py
r129627 r139048 76 76 return build_dir 77 77 78 print 'Could not determine build directory.'78 print('Could not determine build directory.') 79 79 sys.exit(1) 80 80 … … 87 87 process = subprocess.Popen(['pkg-config', '--variable=%s' % variable, package], 88 88 stdout=subprocess.PIPE) 89 stdout = process.communicate()[0] 89 stdout = process.communicate()[0].decode("utf-8") 90 90 if process.returncode: 91 91 return None … … 100 100 process = subprocess.Popen(['pkg-config', pkg_config_path, '--print-requires'], 101 101 stdout=subprocess.PIPE) 102 stdout = process.communicate()[0] 102 stdout = process.communicate()[0].decode("utf-8") 103 103 104 104 if 'gtk+-3.0' in stdout: -
trunk/Tools/gtk/generate-gtkdoc
r138544 r139048 144 144 if not missing_api: 145 145 return 146 print "\nThe following API are missing documentation:"146 print("\nThe following API are missing documentation:") 147 147 for api in missing_api: 148 print "\t%s" % api148 print("\t%s" % api) 149 149 150 150 def generate_doc(generator): … … 179 179 generator = gtkdoc.PkgConfigGTKDoc(pkg_config_path, options) 180 180 if '--rebase' not in sys.argv: 181 print "Generating WebKit1 documentation..."181 print("Generating WebKit1 documentation...") 182 182 saw_webkit1_warnings = generate_doc(generator) 183 183 else: 184 print "Rebasing WebKit1 documentation..."184 print("Rebasing WebKit1 documentation...") 185 185 try: 186 186 generator.rebase_installed_docs() 187 except Exception ,e:188 print "Rebase did not happen, likely no documentation is present."187 except Exception: 188 print("Rebase did not happen, likely no documentation is present.") 189 189 190 190 # WebKit2 might not be enabled, so check for the pkg-config file before building documentation. … … 193 193 generator = gtkdoc.PkgConfigGTKDoc(pkg_config_path, get_webkit2_options()) 194 194 if '--rebase' not in sys.argv: 195 print "\nGenerating WebKit2 documentation..."195 print("\nGenerating WebKit2 documentation...") 196 196 saw_webkit2_warnings = generate_doc(generator) 197 197 else: 198 print "\nRebasing WebKit2 documentation..."198 print("\nRebasing WebKit2 documentation...") 199 199 try: 200 200 generator.rebase_installed_docs() 201 except Exception ,e:202 print "Rebase did not happen, likely no documentation is present."201 except Exception: 202 print("Rebase did not happen, likely no documentation is present.") 203 203 204 204 sys.exit(saw_webkit1_warnings or saw_webkit2_warnings) -
trunk/Tools/gtk/gtkdoc.py
r127475 r139048 108 108 self.logger = logging.getLogger('gtkdoc') 109 109 110 for key, value in args.iteritems():110 for key, value in iter(args.items()): 111 111 setattr(self, key, value) 112 112 … … 186 186 stdout=subprocess.PIPE, 187 187 stderr=subprocess.PIPE) 188 stdout, stderr = process.communicate()188 stdout, stderr = [b.decode("utf-8") for b in process.communicate()] 189 189 190 190 if print_output:
Note: See TracChangeset
for help on using the changeset viewer.