[Python-checkins] CVS: distutils/distutils/command build_py.py,1.25,1.26

Greg Ward python-dev@python.org
Sun, 4 Jun 2000 06:42:55 -0700


Update of /cvsroot/python/distutils/distutils/command
In directory slayer.i.sourceforge.net:/tmp/cvs-serv31616
Modified Files:
	build_py.py 
Log Message:
Renamed 'modules' option to 'py_modules', for consistency with Distribution
(and in order to generate a more sensible error message cleanly).
Index: build_py.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/build_py.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** build_py.py	2000年05月26日 00:44:06	1.25
--- build_py.py	2000年06月04日 13:42:52	1.26
***************
*** 5,9 ****
 # created 1999年03月08日, Greg Ward
 
! __revision__ = "$Id: build_py.py,v 1.25 2000年05月26日 00:44:06 gward Exp $"
 
 import sys, string, os
--- 5,9 ----
 # created 1999年03月08日, Greg Ward
 
! __revision__ = "$Id: build_py.py,v 1.26 2000年06月04日 13:42:52 gward Exp $"
 
 import sys, string, os
***************
*** 27,31 ****
 def initialize_options (self):
 self.build_lib = None
! self.modules = None
 self.package = None
 self.package_dir = None
--- 27,31 ----
 def initialize_options (self):
 self.build_lib = None
! self.py_modules = None
 self.package = None
 self.package_dir = None
***************
*** 40,44 ****
 # options -- list of packages and list of modules.
 self.packages = self.distribution.packages
! self.modules = self.distribution.py_modules
 self.package_dir = self.distribution.package_dir
 
--- 40,44 ----
 # options -- list of packages and list of modules.
 self.packages = self.distribution.packages
! self.py_modules = self.distribution.py_modules
 self.package_dir = self.distribution.package_dir
 
***************
*** 63,67 ****
 
 # Two options control which modules will be installed: 'packages'
! # and 'modules'. The former lets us work with whole packages, not
 # specifying individual modules at all; the latter is for
 # specifying modules one-at-a-time. Currently they are mutually
--- 63,67 ----
 
 # Two options control which modules will be installed: 'packages'
! # and 'py_modules'. The former lets us work with whole packages, not
 # specifying individual modules at all; the latter is for
 # specifying modules one-at-a-time. Currently they are mutually
***************
*** 71,85 ****
 # Dispose of the two "unusual" cases first: no pure Python modules
 # at all (no problem, just return silently), and over-specified
! # 'packages' and 'modules' options.
 
! if not self.modules and not self.packages:
 return
! if self.modules and self.packages:
 raise DistutilsOptionError, \
! "build_py: supplying both 'packages' and 'modules' " + \
 "options is not allowed"
 
! # Now we're down to two cases: 'modules' only and 'packages' only.
! if self.modules:
 self.build_modules ()
 else:
--- 71,85 ----
 # Dispose of the two "unusual" cases first: no pure Python modules
 # at all (no problem, just return silently), and over-specified
! # 'packages' and 'py_modules' options.
 
! if not self.py_modules and not self.packages:
 return
! if self.py_modules and self.packages:
 raise DistutilsOptionError, \
! "build_py: supplying both 'packages' and 'py_modules' " + \
 "options is not allowed"
 
! # Now we're down to two cases: 'py_modules' only and 'packages' only.
! if self.py_modules:
 self.build_modules ()
 else:
***************
*** 195,199 ****
 def find_modules (self):
 """Finds individually-specified Python modules, ie. those listed by
! module name in 'self.modules'. Returns a list of tuples (package,
 module_base, filename): 'package' is a tuple of the path through
 package-space to the module; 'module_base' is the bare (no
--- 195,199 ----
 def find_modules (self):
 """Finds individually-specified Python modules, ie. those listed by
! module name in 'self.py_modules'. Returns a list of tuples (package,
 module_base, filename): 'package' is a tuple of the path through
 package-space to the module; 'module_base' is the bare (no
***************
*** 219,223 ****
 # - don't check for __init__.py in directory for empty package
 
! for module in self.modules:
 path = string.split (module, '.')
 package = tuple (path[0:-1])
--- 219,223 ----
 # - don't check for __init__.py in directory for empty package
 
! for module in self.py_modules:
 path = string.split (module, '.')
 package = tuple (path[0:-1])
***************
*** 252,261 ****
 def find_all_modules (self):
 """Compute the list of all modules that will be built, whether
! they are specified one-module-at-a-time ('self.modules') or
 by whole packages ('self.packages'). Return a list of tuples
 (package, module, module_file), just like 'find_modules()' and
 'find_package_modules()' do."""
 
! if self.modules:
 modules = self.find_modules ()
 else:
--- 252,261 ----
 def find_all_modules (self):
 """Compute the list of all modules that will be built, whether
! they are specified one-module-at-a-time ('self.py_modules') or
 by whole packages ('self.packages'). Return a list of tuples
 (package, module, module_file), just like 'find_modules()' and
 'find_package_modules()' do."""
 
! if self.py_modules:
 modules = self.find_modules ()
 else:

AltStyle によって変換されたページ (->オリジナル) /