diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 08:00:19 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 08:00:19 (GMT) |
commit | d91085598f5185b267ea51a3f615da9527af2ed2 (patch) | |
tree | 80849b9455438e9963a61d7aff3fc3b060213553 /Lib/distutils | |
parent | fe55464f393fc002fd0911a4d8dba6694723d408 (diff) | |
download | cpython-d91085598f5185b267ea51a3f615da9527af2ed2.zip cpython-d91085598f5185b267ea51a3f615da9527af2ed2.tar.gz cpython-d91085598f5185b267ea51a3f615da9527af2ed2.tar.bz2 |
Remove apply()
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/archive_util.py | 2 | ||||
-rw-r--r-- | Lib/distutils/command/build_ext.py | 4 | ||||
-rw-r--r-- | Lib/distutils/command/build_py.py | 8 | ||||
-rw-r--r-- | Lib/distutils/dir_util.py | 2 | ||||
-rw-r--r-- | Lib/distutils/filelist.py | 2 | ||||
-rw-r--r-- | Lib/distutils/util.py | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/Lib/distutils/archive_util.py b/Lib/distutils/archive_util.py index 6aa5e63..b725a14 100644 --- a/Lib/distutils/archive_util.py +++ b/Lib/distutils/archive_util.py @@ -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) diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 4191c76..6ea5d57 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -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 diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py index 621bcb4..3b7ec62 100644 --- a/Lib/distutils/command/build_py.py +++ b/Lib/distutils/command/build_py.py @@ -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): diff --git a/Lib/distutils/dir_util.py b/Lib/distutils/dir_util.py index 43994db..a4aff58 100644 --- a/Lib/distutils/dir_util.py +++ b/Lib/distutils/dir_util.py @@ -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): diff --git a/Lib/distutils/filelist.py b/Lib/distutils/filelist.py index 43f9aaa..4bbdd1f 100644 --- a/Lib/distutils/filelist.py +++ b/Lib/distutils/filelist.py @@ -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 --------------------------- diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index 387e9bd..889bf13 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -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): |