[Python-checkins] CVS: python/dist/src/Lib/distutils sysconfig.py,1.29,1.30
A.M. Kuchling
akuchling@users.sourceforge.net
Tue, 16 Jan 2001 08:33:31 -0800
Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv12249
Modified Files:
sysconfig.py
Log Message:
Fix bugs with integer-valued variables when parsing Makefiles. Values
for done[n] can be integers as well as strings, but the code
concatenates them with strings (fixed by adding a str()) and calls
string.strip() on them (fixed by rearranging the logic)
(Presumably this wasn't noticed previously because parse_makefile()
was only called on Modules/Makefile, which contains no integer-valued
variables.)
Index: sysconfig.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/sysconfig.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** sysconfig.py 2001/01/11 15:35:16 1.29
--- sysconfig.py 2001/01/16 16:33:28 1.30
***************
*** 205,215 ****
if done.has_key(n):
after = value[m.end():]
! value = value[:m.start()] + done[n] + after
if "$" in after:
notdone[name] = value
else:
try: value = string.atoi(value)
! except ValueError: pass
! done[name] = string.strip(value)
del notdone[name]
elif notdone.has_key(n):
--- 205,217 ----
if done.has_key(n):
after = value[m.end():]
! value = value[:m.start()] + str(done[n]) + after
if "$" in after:
notdone[name] = value
else:
try: value = string.atoi(value)
! except ValueError:
! done[name] = string.strip(value)
! else:
! done[name] = value
del notdone[name]
elif notdone.has_key(n):
***************
*** 224,229 ****
else:
try: value = string.atoi(value)
! except ValueError: pass
! done[name] = string.strip(value)
del notdone[name]
else:
--- 226,233 ----
else:
try: value = string.atoi(value)
! except ValueError:
! done[name] = string.strip(value)
! else:
! done[name] = value
del notdone[name]
else: