summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-04-24 05:51:13 +0000
committerGreg Noel <GregNoel@tigris.org>2010-04-24 05:51:13 +0000
commit6a372812448d3462ac91d2c392f323b93df7e383 (patch)
treea4b9f900e52561a91e0c4509dc6c692492996b7f /bin
parentf7ac1212e72b65e2840b9b116b962e3872e30e8e (diff)
downloadscons-6a372812448d3462ac91d2c392f323b93df7e383.tar.gz
http://scons.tigris.org/issues/show_bug.cgi?id=2345
Comb out all code that supported earlier versions of Python. Most such code is in snippets of only a few lines and can be identified by having a Python version string in it. Such snippets add up; this combing pass probably got rid of over 500 lines of code.
Diffstat (limited to 'bin')
-rw-r--r--bin/SConsDoc.py1
-rw-r--r--bin/install_python.py25
-rw-r--r--bin/linecount.py2
-rw-r--r--bin/scons-doc.py6
-rw-r--r--bin/sconsexamples.py7
5 files changed, 2 insertions, 39 deletions
diff --git a/bin/SConsDoc.py b/bin/SConsDoc.py
index 4429fd2e..a82e8219 100644
--- a/bin/SConsDoc.py
+++ b/bin/SConsDoc.py
@@ -2,7 +2,6 @@
#
# Module for handling SCons documentation processing.
#
-from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS
__doc__ = """
This module parses home-brew XML files that document various things
diff --git a/bin/install_python.py b/bin/install_python.py
index ca1c8b77..86807af6 100644
--- a/bin/install_python.py
+++ b/bin/install_python.py
@@ -15,10 +15,6 @@ import sys
from Command import CommandRunner, Usage
all_versions = [
- #'1.5.2', # no longer available at python.org
- '2.0.1',
- '2.1.3',
- '2.2',
'2.3.7',
'2.4.5',
#'2.5.2',
@@ -89,16 +85,6 @@ Usage: install_python.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...]
tar_gz = os.path.join(downloads_dir, python + '.tgz')
tar_gz_url = os.path.join(downloads_url, version, python + '.tgz')
- if (version.startswith('1.5') or
- version.startswith('1.6') or
- version.startswith('2.0')):
-
- configureflags = '--with-threads'
-
- else:
-
- configureflags = ''
-
cmd.subst_dictionary(locals())
if not os.path.exists(tar_gz):
@@ -110,17 +96,6 @@ Usage: install_python.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...]
cmd.run('cd %(python)s')
- if (version.startswith('1.6') or
- version.startswith('2.0')):
-
- def edit_modules_setup_in():
- content = open('Modules/Setup.in', 'r').read()
- content = content.replace('\n#zlib', '\nzlib')
- open('Modules/Setup.in', 'w').write(content)
-
- display = 'ed Modules/Setup.in <<EOF\ns/^#zlib/zlib/\nw\nq\nEOF\n'
- cmd.run((edit_modules_setup_in,), display)
-
cmd.run('./configure --prefix=%(prefix)s %(configureflags)s 2>&1 | tee configure.out')
cmd.run('make 2>&1 | tee make.out')
cmd.run('%(sudo)s make install')
diff --git a/bin/linecount.py b/bin/linecount.py
index b433284a..7dd4c20c 100644
--- a/bin/linecount.py
+++ b/bin/linecount.py
@@ -21,8 +21,6 @@
# in each category, the number of non-blank lines, and the number of
# non-comment lines. The last figure (non-comment) lines is the most
# interesting one for most purposes.
-#
-from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/bin/scons-doc.py b/bin/scons-doc.py
index 7e49cbea..e5b29869 100644
--- a/bin/scons-doc.py
+++ b/bin/scons-doc.py
@@ -88,7 +88,6 @@
# Error output gets passed through to your error output so you
# can see if there are any problems executing the command.
#
-from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS
import optparse
import os
@@ -501,14 +500,11 @@ def ExecuteCommand(args, c, t, dict):
return func(args[1:], c, t, dict)
class MySGML(sgmllib.SGMLParser):
- """A subclass of the standard Python 2.2 sgmllib SGML parser.
+ """A subclass of the standard Python sgmllib SGML parser.
This extends the standard sgmllib parser to recognize, and do cool
stuff with, the added tags that describe our SCons examples,
commands, and other stuff.
-
- Note that this doesn't work with the 1.5.2 sgmllib module, because
- that didn't have the ability to work with ENTITY declarations.
"""
def __init__(self, outfp):
sgmllib.SGMLParser.__init__(self)
diff --git a/bin/sconsexamples.py b/bin/sconsexamples.py
index 6f20ae96..c2768c9b 100644
--- a/bin/sconsexamples.py
+++ b/bin/sconsexamples.py
@@ -66,8 +66,6 @@
# output from SCons, and insert it into the text as appropriate.
# Error output gets passed through to your error output so you
# can see if there are any problems executing the command.
-#
-from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS
import os
import os.path
@@ -222,10 +220,7 @@ SConscript('SConstruct')
"""
class MySGML(sgmllib.SGMLParser):
- """A subclass of the standard Python 2.2 sgmllib SGML parser.
-
- Note that this doesn't work with the 1.5.2 sgmllib module, because
- that didn't have the ability to work with ENTITY declarations.
+ """A subclass of the standard Python sgmllib SGML parser.
"""
def __init__(self):
sgmllib.SGMLParser.__init__(self)