diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-04-17 08:48:32 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-04-17 08:48:32 (GMT) |
commit | 9d72bb452bced3a100f07f8a9e30c4495a9ec41a (patch) | |
tree | c39762a764fcc16f2cfc42e2504e58ff31e159e6 /Lib/distutils/command/build_py.py | |
parent | ff11334927ee616d765b54a3851016b76a20bcec (diff) | |
download | cpython-9d72bb452bced3a100f07f8a9e30c4495a9ec41a.zip cpython-9d72bb452bced3a100f07f8a9e30c4495a9ec41a.tar.gz cpython-9d72bb452bced3a100f07f8a9e30c4495a9ec41a.tar.bz2 |
Remove functions in string module that are also string methods. Also remove:
* all calls to functions in the string module (except maketrans)
* everything from stropmodule except for maketrans() which is still used
Diffstat (limited to 'Lib/distutils/command/build_py.py')
-rw-r--r-- | Lib/distutils/command/build_py.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py index 3b7ec62..990824b 100644 --- a/Lib/distutils/command/build_py.py +++ b/Lib/distutils/command/build_py.py @@ -6,7 +6,7 @@ Implements the Distutils 'build_py' command.""" __revision__ = "$Id$" -import sys, string, os +import sys, os from types import * from glob import glob @@ -150,7 +150,7 @@ class build_py (Command): distribution, where package 'package' should be found (at least according to the 'package_dir' option, if any).""" - path = string.split(package, '.') + path = package.split('.') if not self.package_dir: if path: @@ -161,7 +161,7 @@ class build_py (Command): tail = [] while path: try: - pdir = self.package_dir[string.join(path, '.')] + pdir = self.package_dir['.'.join(path)] except KeyError: tail.insert(0, path[-1]) del path[-1] @@ -272,8 +272,8 @@ class build_py (Command): # - don't check for __init__.py in directory for empty package for module in self.py_modules: - path = string.split(module, '.') - package = string.join(path[0:-1], '.') + path = module.split('.') + package = '.'.join(path[0:-1]) module_base = path[-1] try: @@ -342,7 +342,7 @@ class build_py (Command): modules = self.find_all_modules() outputs = [] for (package, module, module_file) in modules: - package = string.split(package, '.') + package = package.split('.') filename = self.get_module_outfile(self.build_lib, package, module) outputs.append(filename) if include_bytecode: @@ -362,7 +362,7 @@ class build_py (Command): def build_module (self, module, module_file, package): if type(package) is StringType: - package = string.split(package, '.') + package = package.split('.') elif type(package) not in (ListType, TupleType): raise TypeError, \ "'package' must be a string (dot-separated), list, or tuple" |