summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-08-15 13:01:25 (GMT)
committerGreg Ward <gward@python.net>2000-08-15 13:01:25 (GMT)
commitc0fe82ca26b1da22e35f2d0676f09795d052e4f0 (patch)
tree994c6598098a6ca1a022f06b584456ad32cf5aa0 /Lib/distutils
parent16168477ebed81305c7b23f9c61fd558ba6e9f81 (diff)
downloadcpython-c0fe82ca26b1da22e35f2d0676f09795d052e4f0.zip
cpython-c0fe82ca26b1da22e35f2d0676f09795d052e4f0.tar.gz
cpython-c0fe82ca26b1da22e35f2d0676f09795d052e4f0.tar.bz2
Fix long-hidden inconsistency in internal interface: 'find_modules()' now
represents packages as strings, not tuples. This allowed a simplification in 'get_package_dir()', too -- can now assume that 'package' is a string.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/command/build_py.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py
index 0405d39..87e3efa 100644
--- a/Lib/distutils/command/build_py.py
+++ b/Lib/distutils/command/build_py.py
@@ -93,12 +93,7 @@ class build_py (Command):
distribution, where package 'package' should be found
(at least according to the 'package_dir' option, if any)."""
- if type (package) is StringType:
- path = string.split (package, '.')
- elif type (package) in (TupleType, ListType):
- path = list (package)
- else:
- raise TypeError, "'package' must be a string, list, or tuple"
+ path = string.split (package, '.')
if not self.package_dir:
if path:
@@ -220,7 +215,7 @@ class build_py (Command):
for module in self.py_modules:
path = string.split (module, '.')
- package = tuple (path[0:-1])
+ package = string.join(path[0:-1], '.')
module_base = path[-1]
try: