summaryrefslogtreecommitdiffstats
path: root/Tools/freeze/parsesetup.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/freeze/parsesetup.py')
-rw-r--r--Tools/freeze/parsesetup.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/Tools/freeze/parsesetup.py b/Tools/freeze/parsesetup.py
index 7a6b72e..2b9123e 100644
--- a/Tools/freeze/parsesetup.py
+++ b/Tools/freeze/parsesetup.py
@@ -1,7 +1,6 @@
# Parse Makefiles and Python Setup(.in) files.
import re
-import string
# Extract variable definitions from a Makefile.
@@ -29,10 +28,10 @@ def getmakevars(filename):
continue
(name, value) = matchobj.group(1, 2)
# Strip trailing comment
- i = string.find(value, '#')
+ i = value.find('#')
if i >= 0:
value = value[:i]
- value = string.strip(value)
+ value = value.strip()
variables[name] = value
finally:
fp.close()
@@ -60,7 +59,7 @@ def getsetupinfo(filename):
if not line:
break
# Strip comments
- i = string.find(line, '#')
+ i = line.find('#')
if i >= 0:
line = line[:i]
if line.endswith('\\\n'):
@@ -69,9 +68,9 @@ def getsetupinfo(filename):
matchobj = setupvardef.match(line)
if matchobj:
(name, value) = matchobj.group(1, 2)
- variables[name] = string.strip(value)
+ variables[name] = value.strip()
else:
- words = string.split(line)
+ words = line.split()
if words:
modules[words[0]] = words[1:]
finally: