Commit 6811c9d7 authored by Neal Norwitz's avatar Neal Norwitz

Remove apply()

parent 79b3a971
......@@ -162,7 +162,7 @@ def make_archive (base_name, format,
func = format_info[0]
for (arg,val) in format_info[1]:
kwargs[arg] = val
filename = apply(func, (base_name, base_dir), kwargs)
filename = func(base_name, base_dir, **kwargs)
if root_dir is not None:
log.debug("changing back to '%s'", save_cwd)
......
......@@ -613,8 +613,8 @@ class build_ext (Command):
# extensions in debug_mode are named 'module_d.pyd' under windows
so_ext = get_config_var('SO')
if os.name == 'nt' and self.debug:
return apply(os.path.join, ext_path) + '_d' + so_ext
return apply(os.path.join, ext_path) + so_ext
return os.path.join(*ext_path) + '_d' + so_ext
return os.path.join(*ext_path) + so_ext
def get_export_symbols (self, ext):
"""Return the list of symbols that a shared extension has to
......
......@@ -154,7 +154,7 @@ class build_py (Command):
if not self.package_dir:
if path:
return apply(os.path.join, path)
return os.path.join(*path)
else:
return ''
else:
......@@ -167,7 +167,7 @@ class build_py (Command):
del path[-1]
else:
tail.insert(0, pdir)
return apply(os.path.join, tail)
return os.path.join(*tail)
else:
# Oops, got all the way through 'path' without finding a
# match in package_dir. If package_dir defines a directory
......@@ -181,7 +181,7 @@ class build_py (Command):
tail.insert(0, pdir)
if tail:
return apply(os.path.join, tail)
return os.path.join(*tail)
else:
return ''
......@@ -335,7 +335,7 @@ class build_py (Command):
def get_module_outfile (self, build_dir, package, module):
outfile_path = [build_dir] + list(package) + [module + ".py"]
return apply(os.path.join, outfile_path)
return os.path.join(*outfile_path)
def get_outputs (self, include_bytecode=1):
......
......@@ -204,7 +204,7 @@ def remove_tree (directory, verbose=0, dry_run=0):
_build_cmdtuple(directory, cmdtuples)
for cmd in cmdtuples:
try:
apply(cmd[0], (cmd[1],))
cmd[0](cmd[1])
# remove dir from cache if it's already there
abspath = os.path.abspath(cmd[1])
if _path_created.has_key(abspath):
......
......@@ -69,7 +69,7 @@ class FileList:
sortable_files.sort()
self.files = []
for sort_tuple in sortable_files:
self.files.append(apply(os.path.join, sort_tuple))
self.files.append(os.path.join(*sort_tuple))
# -- Other miscellaneous utility methods ---------------------------
......
......@@ -95,7 +95,7 @@ def convert_path (pathname):
paths.remove('.')
if not paths:
return os.curdir
return apply(os.path.join, paths)
return os.path.join(*paths)
# convert_path ()
......@@ -295,7 +295,7 @@ def execute (func, args, msg=None, verbose=0, dry_run=0):
log.info(msg)
if not dry_run:
apply(func, args)
func(*args)
def strtobool (val):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment