[Python-checkins] python/dist/src/Lib/distutils unixccompiler.py,1.45,1.46

jhylton@users.sourceforge.net jhylton@users.sourceforge.net
Tue, 18 Jun 2002 11:45:41 -0700


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

Modified Files:
	unixccompiler.py 
Log Message:
Add implementation of _compile() and use default compile() method.


Index: unixccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/unixccompiler.py,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** unixccompiler.py	13 Jun 2002 17:28:18 -0000	1.45
--- unixccompiler.py	18 Jun 2002 18:45:39 -0000	1.46
***************
*** 106,127 ****
                  raise CompileError, msg
  
!     def compile(self, sources,
!                 output_dir=None, macros=None, include_dirs=None, debug=0,
!                 extra_preargs=None, extra_postargs=None, depends=None):
!         
!         macros, objects, extra_postargs, pp_opts, build = \
!                 self._setup_compile(output_dir, macros, include_dirs, sources,
!                                     depends, extra_postargs)
!         cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
! 
!         for obj, (src, ext) in build.items():
!             try:
!                 self.spawn(self.compiler_so + cc_args +
!                            [src, '-o', obj] + extra_postargs)
!             except DistutilsExecError, msg:
!                 raise CompileError, msg
! 
!         # Return *all* object filenames, not just the ones we just built.
!         return objects
  
      def create_static_lib(self, objects, output_libname,
--- 106,115 ----
                  raise CompileError, msg
  
!     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
!         try:
!             self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
!                        extra_postargs)
!         except DistutilsExecError, msg:
!             raise CompileError, msg
  
      def create_static_lib(self, objects, output_libname,