[Python-checkins] python/dist/src/Lib/distutils emxccompiler.py,1.7,1.8

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Sat, 28 Sep 2002 17:25:53 -0700


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

Modified Files:
	emxccompiler.py 
Log Message:
Whitespace normalization (get rid of tabs).

Index: emxccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/emxccompiler.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** emxccompiler.py	4 Aug 2002 06:21:25 -0000	1.7
--- emxccompiler.py	29 Sep 2002 00:25:51 -0000	1.8
***************
*** 17,21 ****
  #
  # tested configurations:
! #   
  # * EMX gcc 2.81/EMX 0.9d fix03
  
--- 17,21 ----
  #
  # tested configurations:
! #
  # * EMX gcc 2.81/EMX 0.9d fix03
  
***************
*** 41,45 ****
      res_extension = ".res"      # compiled resource file
      exe_extension = ".exe"
!    
      def __init__ (self,
                    verbose=0,
--- 41,45 ----
      res_extension = ".res"      # compiled resource file
      exe_extension = ".exe"
! 
      def __init__ (self,
                    verbose=0,
***************
*** 57,65 ****
                  ("Reason: %s." % details) +
                  "Compiling may fail because of undefined preprocessor macros.")
!         
          (self.gcc_version, self.ld_version) = \
              get_versions()
          self.debug_print(self.compiler_type + ": gcc %s, ld %s\n" %
!                          (self.gcc_version, 
                            self.ld_version) )
  
--- 57,65 ----
                  ("Reason: %s." % details) +
                  "Compiling may fail because of undefined preprocessor macros.")
! 
          (self.gcc_version, self.ld_version) = \
              get_versions()
          self.debug_print(self.compiler_type + ": gcc %s, ld %s\n" %
!                          (self.gcc_version,
                            self.ld_version) )
  
***************
*** 74,78 ****
          # to distribute a version dependent on the compiler we have)
          self.dll_libraries=["gcc"]
!         
      # __init__ ()
  
--- 74,78 ----
          # to distribute a version dependent on the compiler we have)
          self.dll_libraries=["gcc"]
! 
      # __init__ ()
  
***************
*** 84,88 ****
              except DistutilsExecError, msg:
                  raise CompileError, msg
!         else: # for other files use the C-compiler 
              try:
                  self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
--- 84,88 ----
              except DistutilsExecError, msg:
                  raise CompileError, msg
!         else: # for other files use the C-compiler
              try:
                  self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
***************
*** 104,113 ****
                extra_postargs=None,
                build_temp=None):
!         
          # use separate copies, so we can modify the lists
          extra_preargs = copy.copy(extra_preargs or [])
          libraries = copy.copy(libraries or [])
          objects = copy.copy(objects or [])
!                 
          # Additional libraries
          libraries.extend(self.dll_libraries)
--- 104,113 ----
                extra_postargs=None,
                build_temp=None):
! 
          # use separate copies, so we can modify the lists
          extra_preargs = copy.copy(extra_preargs or [])
          libraries = copy.copy(libraries or [])
          objects = copy.copy(objects or [])
! 
          # Additional libraries
          libraries.extend(self.dll_libraries)
***************
*** 119,126 ****
              # (The linker doesn't do anything if output is up-to-date.
              # So it would probably better to check if we really need this,
!             # but for this we had to insert some unchanged parts of 
!             # UnixCCompiler, and this is not what we want.) 
  
!             # we want to put some files in the same directory as the 
              # object files are, build_temp doesn't help much
              # where are the object files
--- 119,126 ----
              # (The linker doesn't do anything if output is up-to-date.
              # So it would probably better to check if we really need this,
!             # but for this we had to insert some unchanged parts of
!             # UnixCCompiler, and this is not what we want.)
  
!             # we want to put some files in the same directory as the
              # object files are, build_temp doesn't help much
              # where are the object files
***************
*** 132,136 ****
              # generate the filenames for these files
              def_file = os.path.join(temp_dir, dll_name + ".def")
!        
              # Generate .def file
              contents = [
--- 132,136 ----
              # generate the filenames for these files
              def_file = os.path.join(temp_dir, dll_name + ".def")
! 
              # Generate .def file
              contents = [
***************
*** 145,163 ****
  
              # next add options for def-file and to creating import libraries
!             # for gcc/ld the def-file is specified as any other object files    
              objects.append(def_file)
  
          #end: if ((export_symbols is not None) and
          #        (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")):
!                                                  
          # who wants symbols and a many times larger output file
!         # should explicitly switch the debug mode on 
          # otherwise we let dllwrap/ld strip the output file
!         # (On my machine: 10KB < stripped_file < ??100KB 
          #   unstripped_file = stripped_file + XXX KB
!         #  ( XXX=254 for a typical python extension)) 
!         if not debug: 
!             extra_preargs.append("-s") 
!         
          UnixCCompiler.link(self,
                             target_desc,
--- 145,163 ----
  
              # next add options for def-file and to creating import libraries
!             # for gcc/ld the def-file is specified as any other object files
              objects.append(def_file)
  
          #end: if ((export_symbols is not None) and
          #        (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")):
! 
          # who wants symbols and a many times larger output file
!         # should explicitly switch the debug mode on
          # otherwise we let dllwrap/ld strip the output file
!         # (On my machine: 10KB < stripped_file < ??100KB
          #   unstripped_file = stripped_file + XXX KB
!         #  ( XXX=254 for a typical python extension))
!         if not debug:
!             extra_preargs.append("-s")
! 
          UnixCCompiler.link(self,
                             target_desc,
***************
*** 173,177 ****
                             extra_postargs,
                             build_temp)
!         
      # link ()
  
--- 173,177 ----
                             extra_postargs,
                             build_temp)
! 
      # link ()
  
***************
*** 197,201 ****
              if ext == '.rc':
                  # these need to be compiled to object files
!                 obj_names.append (os.path.join (output_dir, 
                                              base + self.res_extension))
              else:
--- 197,201 ----
              if ext == '.rc':
                  # these need to be compiled to object files
!                 obj_names.append (os.path.join (output_dir,
                                              base + self.res_extension))
              else:
***************
*** 217,221 ****
          except KeyError:
              emx_dirs = []
! 	
          for dir in dirs + emx_dirs:
              shortlibp = os.path.join(dir, shortlib)
--- 217,221 ----
          except KeyError:
              emx_dirs = []
! 
          for dir in dirs + emx_dirs:
              shortlibp = os.path.join(dir, shortlib)
***************
*** 225,229 ****
              elif os.path.exists(longlibp):
                  return longlibp
!             
          # Oops, didn't find it in *any* of 'dirs'
          return None
--- 225,229 ----
              elif os.path.exists(longlibp):
                  return longlibp
! 
          # Oops, didn't find it in *any* of 'dirs'
          return None
***************
*** 267,279 ****
      if string.find(sys.version,"GCC") >= 0:
          return (CONFIG_H_OK, "sys.version mentions 'GCC'")
!     
      fn = sysconfig.get_config_h_filename()
      try:
          # It would probably better to read single lines to search.
!         # But we do this only once, and it is fast enough 
          f = open(fn)
          s = f.read()
          f.close()
!         
      except IOError, exc:
          # if we can't read this file, we cannot say it is wrong
--- 267,279 ----
      if string.find(sys.version,"GCC") >= 0:
          return (CONFIG_H_OK, "sys.version mentions 'GCC'")
! 
      fn = sysconfig.get_config_h_filename()
      try:
          # It would probably better to read single lines to search.
!         # But we do this only once, and it is fast enough
          f = open(fn)
          s = f.read()
          f.close()
! 
      except IOError, exc:
          # if we can't read this file, we cannot say it is wrong
***************
*** 297,301 ****
      from distutils.spawn import find_executable
      import re
!         
      gcc_exe = find_executable('gcc')
      if gcc_exe:
--- 297,301 ----
      from distutils.spawn import find_executable
      import re
! 
      gcc_exe = find_executable('gcc')
      if gcc_exe:
***************
*** 314,316 ****
      ld_version = None
      return (gcc_version, ld_version)
- 
--- 314,315 ----