mirror of
https://github.com/python/cpython.git
synced 2024-11-25 19:03:49 +08:00
Back out part of rev. 1.53, restoring the use of the string module.
The two long lines have been reflowed differently; hopefully someone on BeOS can test them. Rev. 1.53 also converted string.atoi() to int(); I've left that alone.
This commit is contained in:
parent
fda0674f09
commit
33635aaf93
@ -14,6 +14,7 @@ __revision__ = "$Id$"
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import string
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from errors import DistutilsPlatformError
|
from errors import DistutilsPlatformError
|
||||||
@ -250,7 +251,7 @@ def parse_makefile(fn, g=None):
|
|||||||
m = _variable_rx.match(line)
|
m = _variable_rx.match(line)
|
||||||
if m:
|
if m:
|
||||||
n, v = m.group(1, 2)
|
n, v = m.group(1, 2)
|
||||||
v = v.strip()
|
v = string.strip(v)
|
||||||
if "$" in v:
|
if "$" in v:
|
||||||
notdone[n] = v
|
notdone[n] = v
|
||||||
else:
|
else:
|
||||||
@ -273,7 +274,7 @@ def parse_makefile(fn, g=None):
|
|||||||
else:
|
else:
|
||||||
try: value = int(value)
|
try: value = int(value)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
done[name] = value.strip()
|
done[name] = string.strip(value)
|
||||||
else:
|
else:
|
||||||
done[name] = value
|
done[name] = value
|
||||||
del notdone[name]
|
del notdone[name]
|
||||||
@ -289,7 +290,7 @@ def parse_makefile(fn, g=None):
|
|||||||
else:
|
else:
|
||||||
try: value = int(value)
|
try: value = int(value)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
done[name] = value.strip()
|
done[name] = string.strip(value)
|
||||||
else:
|
else:
|
||||||
done[name] = value
|
done[name] = value
|
||||||
del notdone[name]
|
del notdone[name]
|
||||||
@ -368,7 +369,8 @@ def _init_posix():
|
|||||||
# relative to the srcdir, which after installation no longer makes
|
# relative to the srcdir, which after installation no longer makes
|
||||||
# sense.
|
# sense.
|
||||||
python_lib = get_python_lib(standard_lib=1)
|
python_lib = get_python_lib(standard_lib=1)
|
||||||
linkerscript_name = os.path.basename(g['LDSHARED'].split()[0])
|
linkerscript_path = string.split(g['LDSHARED'])[0]
|
||||||
|
linkerscript_name = os.path.basename(linkerscript_path)
|
||||||
linkerscript = os.path.join(python_lib, 'config',
|
linkerscript = os.path.join(python_lib, 'config',
|
||||||
linkerscript_name)
|
linkerscript_name)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user