Commit a5f4c071 authored by Jeremy Hylton's avatar Jeremy Hylton

Remove use of string module and reflow a couple of long lines.

parent 8f4dcbd3
...@@ -14,7 +14,6 @@ __revision__ = "$Id$" ...@@ -14,7 +14,6 @@ __revision__ = "$Id$"
import os import os
import re import re
import string
import sys import sys
from errors import DistutilsPlatformError from errors import DistutilsPlatformError
...@@ -213,7 +212,7 @@ def parse_config_h(fp, g=None): ...@@ -213,7 +212,7 @@ def parse_config_h(fp, g=None):
m = define_rx.match(line) m = define_rx.match(line)
if m: if m:
n, v = m.group(1, 2) n, v = m.group(1, 2)
try: v = string.atoi(v) try: v = int(v)
except ValueError: pass except ValueError: pass
g[n] = v g[n] = v
else: else:
...@@ -251,11 +250,11 @@ def parse_makefile(fn, g=None): ...@@ -251,11 +250,11 @@ 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 = string.strip(v) v = v.strip()
if "$" in v: if "$" in v:
notdone[n] = v notdone[n] = v
else: else:
try: v = string.atoi(v) try: v = int(v)
except ValueError: pass except ValueError: pass
done[n] = v done[n] = v
...@@ -272,9 +271,9 @@ def parse_makefile(fn, g=None): ...@@ -272,9 +271,9 @@ def parse_makefile(fn, g=None):
if "$" in after: if "$" in after:
notdone[name] = value notdone[name] = value
else: else:
try: value = string.atoi(value) try: value = int(value)
except ValueError: except ValueError:
done[name] = string.strip(value) done[name] = value.strip()
else: else:
done[name] = value done[name] = value
del notdone[name] del notdone[name]
...@@ -288,9 +287,9 @@ def parse_makefile(fn, g=None): ...@@ -288,9 +287,9 @@ def parse_makefile(fn, g=None):
if "$" in after: if "$" in after:
notdone[name] = value notdone[name] = value
else: else:
try: value = string.atoi(value) try: value = int(value)
except ValueError: except ValueError:
done[name] = string.strip(value) done[name] = value.strip()
else: else:
done[name] = value done[name] = value
del notdone[name] del notdone[name]
...@@ -369,8 +368,9 @@ def _init_posix(): ...@@ -369,8 +368,9 @@ 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(string.split(g['LDSHARED'])[0]) linkerscript_name = os.path.basename(g['LDSHARED'].split()[0])
linkerscript = os.path.join(python_lib, 'config', linkerscript_name) linkerscript = os.path.join(python_lib, 'config',
linkerscript_name)
# XXX this isn't the right place to do this: adding the Python # XXX this isn't the right place to do this: adding the Python
# library to the link, if needed, should be in the "build_ext" # library to the link, if needed, should be in the "build_ext"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment