mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Update the URL for getting zlib, and update the minimal required
version to 1.1.4 (because of the 1.1.3 security problem). Also replace a funny use of line.find() with line.startswith().
This commit is contained in:
parent
0855dd8938
commit
8cdc03dca5
1 changed files with 4 additions and 4 deletions
8
setup.py
8
setup.py
|
@ -653,19 +653,19 @@ class PyBuildExt(build_ext):
|
||||||
|
|
||||||
|
|
||||||
# Andrew Kuchling's zlib module.
|
# Andrew Kuchling's zlib module.
|
||||||
# This require zlib 1.1.3 (or later).
|
# This requires zlib 1.1.4 (1.1.3 has a security problem).
|
||||||
# See http://www.cdrom.com/pub/infozip/zlib/
|
# See http://www.gzip.org/zlib/
|
||||||
zlib_inc = find_file('zlib.h', [], inc_dirs)
|
zlib_inc = find_file('zlib.h', [], inc_dirs)
|
||||||
if zlib_inc is not None:
|
if zlib_inc is not None:
|
||||||
zlib_h = zlib_inc[0] + '/zlib.h'
|
zlib_h = zlib_inc[0] + '/zlib.h'
|
||||||
version = '"0.0.0"'
|
version = '"0.0.0"'
|
||||||
version_req = '"1.1.3"'
|
version_req = '"1.1.4"'
|
||||||
fp = open(zlib_h)
|
fp = open(zlib_h)
|
||||||
while 1:
|
while 1:
|
||||||
line = fp.readline()
|
line = fp.readline()
|
||||||
if not line:
|
if not line:
|
||||||
break
|
break
|
||||||
if line.find('#define ZLIB_VERSION', 0) == 0:
|
if line.startswith('#define ZLIB_VERSION'):
|
||||||
version = line.split()[2]
|
version = line.split()[2]
|
||||||
break
|
break
|
||||||
if version >= version_req:
|
if version >= version_req:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue