Author: reinhard Date: 2007-05-09 13:08:49 -0500 (Wed, 09 May 2007) New Revision: 9564
Modified: trunk/gnue-common/setup.py Log: Replaced "print" with "log.*". Modified: trunk/gnue-common/setup.py =================================================================== --- trunk/gnue-common/setup.py 2007-05-09 17:24:26 UTC (rev 9563) +++ trunk/gnue-common/setup.py 2007-05-09 18:08:49 UTC (rev 9564) @@ -101,30 +101,30 @@ if os.path.isdir ('po'): # xgettext if os.system ("pygettext --version > /dev/null") != 0: - print "Could not find 'pygettext'. Strange." - print "It should be included in the Python distribution." + log.fatal("Could not find 'pygettext'. Strange.") + log.fatal("It should be included in the Python distribution.") sys.exit (1) # msgmerge if os.system ("msgmerge --version > /dev/null") != 0: - print "Could not find 'msgmerge'. Please install Gettext." + log.fatal("Could not find 'msgmerge'. Please install Gettext.") sys.exit (1) # msgfmt if os.system ("msgfmt --version > /dev/null") != 0: - print "Could not find 'msgfmt'. Please install Gettext." + log.fatal("Could not find 'msgfmt'. Please install Gettext.") sys.exit (1) # ------------------------------------------------------------------------- if action == 'sdist': # build ChangeLog file - print 'building ChangeLog' + log.info('building ChangeLog') ChangeLog.build () # build translations if os.path.isdir ('po'): - print "building translations" + log.info("building translations") if os.system ("cd po && make gmo") != 0: sys.exit (1) @@ -150,10 +150,9 @@ potfile.close() # build translations - print "building translations" + log.info("building translations") for f in os.listdir('po'): if f[-3:] == '.po': - print f msgfmt.make ('po/'+f, 'po/'+f[:-3]+'.gmo') msgfmt.MESSAGES = {} @@ -164,7 +163,7 @@ def build_svnrev(filename): - print "building svnrev.py" + log.info("building svnrev.py") output = open(filename, 'w') output.write('svnrev = %r' % version.get_svn_revision('src')) output.close() @@ -185,6 +184,7 @@ # No changes should be required below this line # ============================================================================= +from distutils import log from distutils.core import setup from distutils.util import change_root from distutils.sysconfig import get_python_lib @@ -348,7 +348,6 @@ def __write_gnue_pth (self): # we need gnue.pth only if we don't install in python's search path - print self.__remove_root(self.install_lib) if self.__remove_root(self.install_lib) not in sys.path: # where to install gnue.pth site_dir = get_python_lib () @@ -362,7 +361,7 @@ # now create the file file = os.path.join (site_dir, "gnue.pth") - print "trying to create %s" % file + log.info("trying to create %s" % file) try: output = open (file, "w") output.write (self.__quote (self.install_lib)) @@ -384,7 +383,7 @@ if not os.path.isdir (dir): os.makedirs (dir) file = os.path.join (dir, "paths.py") - print "creating %s" % file + log.info("creating %s" % file) output = open (file, "w") output.write ("# This file was generated during installation.\n") output.write ("import os, sys\n") _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org http://lists.gnu.org/mailman/listinfo/commit-gnue