[Python-checkins] CVS: python/dist/src/Lib/distutils ccompiler.py,1.39,1.40 unixccompiler.py,1.35,1.36

Jack Jansen jackjansen@users.sourceforge.net
Mon, 27 Aug 2001 08:08:18 -0700


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

Modified Files:
	ccompiler.py unixccompiler.py 
Log Message:
Patch by Bill Noon: added 'dylib' as a library type along with
'static' and 'shared'. This fixes extension building for dynamic
Pythons on MacOSX.


Index: ccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/ccompiler.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** ccompiler.py	2001/02/27 19:13:15	1.39
--- ccompiler.py	2001/08/27 15:08:16	1.40
***************
*** 793,798 ****
  
          if output_dir is None: output_dir = ''
!         if lib_type not in ("static","shared"):
!             raise ValueError, "'lib_type' must be \"static\" or \"shared\""
          fmt = getattr (self, lib_type + "_lib_format")
          ext = getattr (self, lib_type + "_lib_extension")
--- 793,798 ----
  
          if output_dir is None: output_dir = ''
!         if lib_type not in ("static","shared","dylib"):
!             raise ValueError, "'lib_type' must be \"static\", \"shared\" or \"dylib\""
          fmt = getattr (self, lib_type + "_lib_format")
          ext = getattr (self, lib_type + "_lib_extension")

Index: unixccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/unixccompiler.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** unixccompiler.py	2001/07/16 14:46:13	1.35
--- unixccompiler.py	2001/08/27 15:08:16	1.36
***************
*** 72,76 ****
      static_lib_extension = ".a"
      shared_lib_extension = ".so"
!     static_lib_format = shared_lib_format = "lib%s%s"
  
  
--- 72,77 ----
      static_lib_extension = ".a"
      shared_lib_extension = ".so"
!     dylib_lib_extension = ".dylib"
!     static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s"
  
  
***************
*** 260,263 ****
--- 261,266 ----
              shared = os.path.join(
                  dir, self.library_filename(lib, lib_type='shared'))
+             dylib = os.path.join(
+                 dir, self.library_filename(lib, lib_type='dylib'))
              static = os.path.join(
                  dir, self.library_filename(lib, lib_type='static'))
***************
*** 267,271 ****
              # assuming that *all* Unix C compilers do.  And of course I'm
              # ignoring even GCC's "-static" option.  So sue me.
!             if os.path.exists(shared):
                  return shared
              elif os.path.exists(static):
--- 270,276 ----
              # assuming that *all* Unix C compilers do.  And of course I'm
              # ignoring even GCC's "-static" option.  So sue me.
!             if os.path.exists(dylib):
!                 return dylib
!             elif os.path.exists(shared):
                  return shared
              elif os.path.exists(static):