summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/util.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-11-15 10:43:20 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-11-15 10:43:20 (GMT)
commit4d1554650475cc9a2c2773d6758687f4b3542de9 (patch)
tree90440373b540b9097ae6c9116992243b4dd75941 /Lib/packaging/util.py
parent9b5c7f44fad8fd78c23826218c6e7b425c06b183 (diff)
downloadcpython-4d1554650475cc9a2c2773d6758687f4b3542de9.zip
cpython-4d1554650475cc9a2c2773d6758687f4b3542de9.tar.gz
cpython-4d1554650475cc9a2c2773d6758687f4b3542de9.tar.bz2
Remove obsolete verbose arguments from packaging.
Logging replaces verbose arguments. I haven’t fixed the example in Doc/install/install.rst because I have major fixes and changes to the oc under way and will fix or remove that example as part of that task.
Diffstat (limited to 'Lib/packaging/util.py')
-rw-r--r--Lib/packaging/util.py23
1 files changed, 9 insertions, 14 deletions
diff --git a/Lib/packaging/util.py b/Lib/packaging/util.py
index e1d7ad0..5b651b1 100644
--- a/Lib/packaging/util.py
+++ b/Lib/packaging/util.py
@@ -259,7 +259,7 @@ def split_multiline(value):
if element]
-def execute(func, args, msg=None, verbose=0, dry_run=False):
+def execute(func, args, msg=None, dry_run=False):
"""Perform some action that affects the outside world.
Some actions (e.g. writing to the filesystem) are special because
@@ -681,7 +681,7 @@ if sys.platform == 'darwin':
_cfg_target_split = None
-def spawn(cmd, search_path=True, verbose=0, dry_run=False, env=None):
+def spawn(cmd, search_path=True, dry_run=False, env=None):
"""Run another program specified as a command list 'cmd' in a new process.
'cmd' is just the argument list for the new process, ie.
@@ -1331,8 +1331,7 @@ def get_install_method(path):
# XXX to be replaced by shutil.copytree
def copy_tree(src, dst, preserve_mode=True, preserve_times=True,
- preserve_symlinks=False, update=False, verbose=True,
- dry_run=False):
+ preserve_symlinks=False, update=False, dry_run=False):
# FIXME use of this function is why we get spurious logging message on
# stdout when tests run; kill and replace by shutil!
from distutils.file_util import copy_file
@@ -1351,7 +1350,7 @@ def copy_tree(src, dst, preserve_mode=True, preserve_times=True,
"error listing files in '%s': %s" % (src, errstr))
if not dry_run:
- _mkpath(dst, verbose=verbose)
+ _mkpath(dst)
outputs = []
@@ -1361,8 +1360,7 @@ def copy_tree(src, dst, preserve_mode=True, preserve_times=True,
if preserve_symlinks and os.path.islink(src_name):
link_dest = os.readlink(src_name)
- if verbose >= 1:
- logger.info("linking %s -> %s", dst_name, link_dest)
+ logger.info("linking %s -> %s", dst_name, link_dest)
if not dry_run:
os.symlink(link_dest, dst_name)
outputs.append(dst_name)
@@ -1371,11 +1369,10 @@ def copy_tree(src, dst, preserve_mode=True, preserve_times=True,
outputs.extend(
copy_tree(src_name, dst_name, preserve_mode,
preserve_times, preserve_symlinks, update,
- verbose=verbose, dry_run=dry_run))
+ dry_run=dry_run))
else:
copy_file(src_name, dst_name, preserve_mode,
- preserve_times, update, verbose=verbose,
- dry_run=dry_run)
+ preserve_times, update, dry_run=dry_run)
outputs.append(dst_name)
return outputs
@@ -1388,7 +1385,7 @@ _path_created = set()
# I don't use os.makedirs because a) it's new to Python 1.5.2, and
# b) it blows up if the directory already exists (I want to silently
# succeed in that case).
-def _mkpath(name, mode=0o777, verbose=True, dry_run=False):
+def _mkpath(name, mode=0o777, dry_run=False):
# Detect a common bug -- name is None
if not isinstance(name, str):
raise PackagingInternalError(
@@ -1423,9 +1420,7 @@ def _mkpath(name, mode=0o777, verbose=True, dry_run=False):
if abs_head in _path_created:
continue
- if verbose >= 1:
- logger.info("creating %s", head)
-
+ logger.info("creating %s", head)
if not dry_run:
try:
os.mkdir(head, mode)