diff roundup/dist/command/build.py @ 5376:64b05e24dbd8

Python 3 preparation: convert print to a function. Tool-assisted patch. It is possible that some "from __future__ import print_function" are not in fact needed, if a file only uses print() with a single string as an argument and so would work fine in Python 2 without that import.
author Joseph Myers <jsm@polyomino.org.uk>
date Tue, 24 Jul 2018 09:54:52 +0000
parents 85dfe17c182e
children f2fade4552c5
line wrap: on
line diff
--- a/roundup/dist/command/build.py	Sat Jul 21 23:07:16 2018 +1000
+++ b/roundup/dist/command/build.py	Tue Jul 24 09:54:52 2018 +0000
@@ -3,6 +3,7 @@
 # All rights reserved.
 # For license terms see the file COPYING.txt.
 #
+from __future__ import print_function
 from roundup import msgfmt
 from distutils.command.build import build as base
 import os
@@ -26,7 +27,7 @@
     try:
         f = open('MANIFEST')
     except:
-        print '\n*** SOURCE WARNING: The MANIFEST file is missing!'
+        print('\n*** SOURCE WARNING: The MANIFEST file is missing!')
         return
     try:
         manifest = [l.strip() for l in f.readlines()]
@@ -38,9 +39,9 @@
         'roundup-mailgw', 'roundup-server', 'roundup-xmlrpc-server'])
     if err:
         n = len(manifest)
-        print '\n*** SOURCE WARNING: There are files missing (%d/%d found)!'%(
-            n-len(err), n)
-        print 'Missing:', '\nMissing: '.join(err)
+        print('\n*** SOURCE WARNING: There are files missing (%d/%d found)!'%(
+            n-len(err), n))
+        print('Missing:', '\nMissing: '.join(err))
 
 def build_message_files(command):
     """For each locale/*.po, build .mo file in target locale directory"""

Roundup Issue Tracker: http://roundup-tracker.org/