summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/bdist_pkgtool.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2002-06-04 20:14:43 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2002-06-04 20:14:43 (GMT)
commitcd8a1148e19116db109f27d26c02e1de536dc76e (patch)
treee3969bc16f8ef0c540f1d0e72fb0da711344d758 /Lib/distutils/command/bdist_pkgtool.py
parent6fa82a34775576b90c8ec38e8968dfbb0b02e11d (diff)
downloadcpython-cd8a1148e19116db109f27d26c02e1de536dc76e.zip
cpython-cd8a1148e19116db109f27d26c02e1de536dc76e.tar.gz
cpython-cd8a1148e19116db109f27d26c02e1de536dc76e.tar.bz2
Make setup.py less chatty by default.
This is a conservative version of SF patch 504889. It uses the log module instead of calling print in various places, and it ignores the verbose argument passed to many functions and set as an attribute on some objects. Instead, it uses the verbosity set on the logger via the command line. The log module is now preferred over announce() and warn() methods that exist only for backwards compatibility. XXX This checkin changes a lot of modules that have no test suite and aren't exercised by the Python build process. It will need substantial testing.
Diffstat (limited to 'Lib/distutils/command/bdist_pkgtool.py')
-rw-r--r--Lib/distutils/command/bdist_pkgtool.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/Lib/distutils/command/bdist_pkgtool.py b/Lib/distutils/command/bdist_pkgtool.py
index a36638a..4fd9501 100644
--- a/Lib/distutils/command/bdist_pkgtool.py
+++ b/Lib/distutils/command/bdist_pkgtool.py
@@ -15,6 +15,7 @@ from distutils.file_util import write_file
from distutils.errors import *
from distutils.command import bdist_packager
from distutils import sysconfig
+from distutils import log
import compileall
from commands import getoutput
@@ -211,9 +212,9 @@ class bdist_pkgtool (bdist_packager.bdist_packager):
install = self.reinitialize_command('install', reinit_subcommands=1)
# build package
- self.announce('Building package')
+ log.info('Building package')
self.run_command('build')
- self.announce('Creating pkginfo file')
+ log.info('Creating pkginfo file')
path = os.path.join(pkg_dir, "pkginfo")
self.execute(write_file,
(path,
@@ -244,7 +245,7 @@ class bdist_pkgtool (bdist_packager.bdist_packager):
self.write_script(os.path.join(pkg_dir, "depend"),
'depend',None)
- self.announce('Creating prototype file')
+ log.info('Creating prototype file')
path = os.path.join(pkg_dir, "prototype")
self.execute(write_file,
(path,
@@ -256,7 +257,7 @@ class bdist_pkgtool (bdist_packager.bdist_packager):
return
- self.announce('Creating package')
+ log.info('Creating package')
pkg_cmd = ['pkgmk', '-o', '-f']
pkg_cmd.append(path)
pkg_cmd.append('-b')
@@ -265,7 +266,7 @@ class bdist_pkgtool (bdist_packager.bdist_packager):
pkg_cmd = ['pkgtrans', '-s', '/var/spool/pkg']
path = os.path.join(os.environ['PWD'],pkg_dir,
self.get_binary_name() + ".pkg")
- self.announce('Transferring package to ' + pkg_dir)
+ log.info('Transferring package to ' + pkg_dir)
pkg_cmd.append(path)
pkg_cmd.append(self.pkg_abrev)
self.spawn(pkg_cmd)
@@ -326,7 +327,7 @@ class bdist_pkgtool (bdist_packager.bdist_packager):
if self.no_autorelocate==0:
request=string.split(DEFAULT_REQUEST,"\012")
else:
- self.announce('Creating relocation request script')
+ log.info('Creating relocation request script')
if self.request:
users_request=self.get_script('request')
if users_request!=None and users_request!=[]: