[Patches] [ python-Patches-416262 ] 2.1c1: make setup.py check zlib version
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 18 May 2001 10:13:09 -0700
Patches item #416262, was updated on 2001-04-15 06:14
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=416262&group_id=5470
Category: Build
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Mark Favas (mfavas)
Assigned to: M.-A. Lemburg (lemburg)
Summary: 2.1c1: make setup.py check zlib version
Initial Comment:
Currently, setup.py will build the zlib module without
checking whether the version of zlib on the target
system is up to date (or at least 1.1.3). The module
will thus be built on a stock SGI system where the zlib
version is 1.0.4. WHen the zlib test is run, a core
dump results. The patch below checks the version of
zlib, and only builds if >= 1.1.3
*** setup.py.orig Sun Apr 15 20:59:34 2001
--- setup.py Sun Apr 15 21:00:53 2001
***************
*** 449,457 ****
# Andrew Kuchling's zlib module.
# This require zlib 1.1.3 (or later).
# See http://www.cdrom.com/pub/infozip/zlib/
! if (self.compiler.find_library_file(lib_dirs,
'z')):
! exts.append( Extension('zlib',
['zlibmodule.c'],
! libraries = ['z'])
)
# Interface to the Expat XML parser
#
--- 449,471 ----
# Andrew Kuchling's zlib module.
# This require zlib 1.1.3 (or later).
# See http://www.cdrom.com/pub/infozip/zlib/
! zlib_inc = find_file('zlib.h', [], inc_dirs)
! if zlib_inc is not None:
! zlib_h = zlib_inc[0] + '/zlib.h'
! version = '"0.0.0"'
! version_req = '"1.1.3"'
! fp = open(zlib_h)
! while 1:
! line = fp.readline()
! if not line:
! break
! if line.find('#define ZLIB_VERSION',
0) == 0:
! version = line.split()[2]
! break
! if version >= version_req:
! if
(self.compiler.find_library_file(lib_dirs, 'z')):
! exts.append( Extension('zlib',
['zlibmodule.c'],
! libraries
= ['z']) )
# Interface to the Expat XML parser
#
----------------------------------------------------------------------
>Comment By: M.-A. Lemburg (lemburg)
Date: 2001-05-18 10:13
Message:
Logged In: YES
user_id=38388
This is already in Python 2.1.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=416262&group_id=5470