diff options
author | Walter Dörwald <walter@livinglogic.de> | 2002-09-11 20:36:02 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2002-09-11 20:36:02 (GMT) |
commit | aaab30e00cc3e8d90c71b8657c284feeb4ac1413 (patch) | |
tree | d055e0bd374770014d9afdff1b961418b1828584 /Tools/freeze/freeze.py | |
parent | 6a0477b099560a452e37fe77c3850bf232487c16 (diff) | |
download | cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.zip cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.tar.gz cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.tar.bz2 |
Apply diff2.txt from SF patch http://www.python.org/sf/572113
(with one small bugfix in bgen/bgen/scantools.py)
This replaces string module functions with string methods
for the stuff in the Tools directory. Several uses of
string.letters etc. are still remaining.
Diffstat (limited to 'Tools/freeze/freeze.py')
-rwxr-xr-x | Tools/freeze/freeze.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Tools/freeze/freeze.py b/Tools/freeze/freeze.py index 0b9b206..2c59807 100755 --- a/Tools/freeze/freeze.py +++ b/Tools/freeze/freeze.py @@ -91,7 +91,6 @@ if it does, the resulting binary is not self-contained. import getopt import os -import string import sys @@ -148,7 +147,7 @@ def main(): # last option can not be "-i", so this ensures "pos+1" is in range! if sys.argv[pos] == '-i': try: - options = string.split(open(sys.argv[pos+1]).read()) + options = open(sys.argv[pos+1]).read().split() except IOError, why: usage("File name '%s' specified with the -i option " "can not be read - %s" % (sys.argv[pos+1], why) ) @@ -198,9 +197,9 @@ def main(): if o == '-l': addn_link.append(a) if o == '-a': - apply(modulefinder.AddPackagePath, tuple(string.split(a,"=", 2))) + apply(modulefinder.AddPackagePath, tuple(a.split("=", 2))) if o == '-r': - f,r = string.split(a,"=", 2) + f,r = a.split("=", 2) replace_paths.append( (f,r) ) # default prefix and exec_prefix @@ -419,7 +418,7 @@ def main(): # report unknown modules if unknown: sys.stderr.write('Warning: unknown modules remain: %s\n' % - string.join(unknown)) + ' '.join(unknown)) # windows gets different treatment if win: @@ -462,8 +461,8 @@ def main(): for key in makevars.keys(): somevars[key] = makevars[key] - somevars['CFLAGS'] = string.join(cflags) # override - somevars['CPPFLAGS'] = string.join(cppflags) # override + somevars['CFLAGS'] = ' '.join(cflags) # override + somevars['CPPFLAGS'] = ' '.join(cppflags) # override files = [base_config_c, base_frozen_c] + \ files + supp_sources + addfiles + libs + \ ['$(MODLIBS)', '$(LIBS)', '$(SYSLIBS)'] |