[Python-checkins] CVS: python/dist/src/Lib/distutils ccompiler.py,1.39,1.39.4.1 unixccompiler.py,1.33.2.1,1.33.2.2
Anthony Baxter
anthonybaxter@users.sourceforge.net
Tue, 04 Dec 2001 22:57:33 -0800
Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv7463
Modified Files:
Tag: release21-maint
ccompiler.py unixccompiler.py
Log Message:
backport unixccompiler.py 1.36, ccompiler.py 1.40
support for dylib - allow zlib included in OS to be
used rather than have to compile and install in /usr/local
Index: ccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/ccompiler.py,v
retrieving revision 1.39
retrieving revision 1.39.4.1
diff -C2 -d -r1.39 -r1.39.4.1
*** ccompiler.py 2001/02/27 19:13:15 1.39
--- ccompiler.py 2001/12/05 06:57:31 1.39.4.1
***************
*** 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.33.2.1
retrieving revision 1.33.2.2
diff -C2 -d -r1.33.2.1 -r1.33.2.2
*** unixccompiler.py 2001/07/19 09:50:49 1.33.2.1
--- unixccompiler.py 2001/12/05 06:57:31 1.33.2.2
***************
*** 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):