[Python-checkins] CVS: distutils/distutils/command build_py.py,1.26,1.27
Greg Ward
python-dev@python.org
Tue, 15 Aug 2000 06:01:28 -0700
Update of /cvsroot/python/distutils/distutils/command
In directory slayer.i.sourceforge.net:/tmp/cvs-serv26489
Modified Files:
build_py.py
Log Message:
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.
Index: build_py.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/build_py.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** build_py.py 2000/06/04 13:42:52 1.26
--- build_py.py 2000/08/15 13:01:25 1.27
***************
*** 94,103 ****
(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"
if not self.package_dir:
--- 94,98 ----
(at least according to the 'package_dir' option, if any)."""
! path = string.split (package, '.')
if not self.package_dir:
***************
*** 221,225 ****
for module in self.py_modules:
path = string.split (module, '.')
! package = tuple (path[0:-1])
module_base = path[-1]
--- 216,220 ----
for module in self.py_modules:
path = string.split (module, '.')
! package = string.join(path[0:-1], '.')
module_base = path[-1]