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

Remove apply()

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