Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 33635aa

Browse files
committed
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.
1 parent fda0674 commit 33635aa

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Lib/distutils/sysconfig.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import os
1616
import re
17+
import string
1718
import sys
1819

1920
from errors import DistutilsPlatformError
@@ -250,7 +251,7 @@ def parse_makefile(fn, g=None):
250251
m = _variable_rx.match(line)
251252
if m:
252253
n, v = m.group(1, 2)
253-
v = v.strip()
254+
v = string.strip(v)
254255
if "$" in v:
255256
notdone[n] = v
256257
else:
@@ -273,7 +274,7 @@ def parse_makefile(fn, g=None):
273274
else:
274275
try: value = int(value)
275276
except ValueError:
276-
done[name] = value.strip()
277+
done[name] = string.strip(value)
277278
else:
278279
done[name] = value
279280
del notdone[name]
@@ -289,7 +290,7 @@ def parse_makefile(fn, g=None):
289290
else:
290291
try: value = int(value)
291292
except ValueError:
292-
done[name] = value.strip()
293+
done[name] = string.strip(value)
293294
else:
294295
done[name] = value
295296
del notdone[name]
@@ -368,7 +369,8 @@ def _init_posix():
368369
# relative to the srcdir, which after installation no longer makes
369370
# sense.
370371
python_lib = get_python_lib(standard_lib=1)
371-
linkerscript_name = os.path.basename(g['LDSHARED'].split()[0])
372+
linkerscript_path = string.split(g['LDSHARED'])[0]
373+
linkerscript_name = os.path.basename(linkerscript_path)
372374
linkerscript = os.path.join(python_lib, 'config',
373375
linkerscript_name)
374376

0 commit comments

Comments
 (0)