[Python-checkins] CVS: python/dist/src/Lib/distutils/command build_clib.py,1.22,1.23

A.M. Kuchling akuchling@users.sourceforge.net
Fri, 10 Aug 2001 13:24:35 -0700


Update of /cvsroot/python/python/dist/src/Lib/distutils/command
In directory usw-pr-cvs1:/tmp/cvs-serv26656

Modified Files:
	build_clib.py 
Log Message:
[Bug #414032] Make the 'sdist' command work when the distribution contains
    libraries.  This is done by adding a .get_source_files() method, 
    contributed by Rene Liebscher and slightly modified.
Remove an unused local variable spotted by PyChecker


Index: build_clib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_clib.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** build_clib.py	2000/10/14 04:06:40	1.22
--- build_clib.py	2001/08/10 20:24:33	1.23
***************
*** 185,191 ****
  
  
!     def build_libraries (self, libraries):
  
!         compiler = self.compiler
  
          for (lib_name, build_info) in libraries:
--- 185,207 ----
  
  
!     def get_source_files (self):
!         self.check_library_list(self.libraries)
!         filenames = []
!         for (lib_name, build_info) in self.libraries:
!             sources = build_info.get('sources')
!             if (sources is None or
!                 type(sources) not in (ListType, TupleType) ):
!                 raise DistutilsSetupError, \
!                       ("in 'libraries' option (library '%s'), "
!                        "'sources' must be present and must be "
!                        "a list of source filenames") % lib_name
!             
!             filenames.extend(sources)
  
!         return filenames
!     # get_source_files ()
! 
! 
!     def build_libraries (self, libraries):
  
          for (lib_name, build_info) in libraries: