diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-04-24 05:51:13 (GMT) |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-04-24 05:51:13 (GMT) |
commit | 7e116b31182749950856c622ca7932031f8be19c (patch) | |
tree | a4b9f900e52561a91e0c4509dc6c692492996b7f /doc | |
parent | 591b78f0f314f11192fdf13d3baa66f81b160e44 (diff) | |
download | SCons-7e116b31182749950856c622ca7932031f8be19c.zip SCons-7e116b31182749950856c622ca7932031f8be19c.tar.gz SCons-7e116b31182749950856c622ca7932031f8be19c.tar.bz2 |
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 'doc')
-rw-r--r-- | doc/SConscript | 2 | ||||
-rw-r--r-- | doc/man/scons.1 | 18 | ||||
-rw-r--r-- | doc/python10/process.xml | 2 | ||||
-rw-r--r-- | doc/user/build-install.in | 17 | ||||
-rw-r--r-- | doc/user/build-install.xml | 17 | ||||
-rw-r--r-- | doc/user/builders-built-in.in | 13 | ||||
-rw-r--r-- | doc/user/builders-built-in.xml | 13 | ||||
-rw-r--r-- | doc/user/misc.in | 4 | ||||
-rw-r--r-- | doc/user/misc.xml | 4 | ||||
-rw-r--r-- | doc/user/tasks.in | 29 | ||||
-rw-r--r-- | doc/user/tasks.xml | 29 |
11 files changed, 15 insertions, 133 deletions
diff --git a/doc/SConscript b/doc/SConscript index 7af3d33..e22aec0 100644 --- a/doc/SConscript +++ b/doc/SConscript @@ -23,8 +23,6 @@ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS import os.path import re diff --git a/doc/man/scons.1 b/doc/man/scons.1 index 3a47547..51b2ac1 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -380,7 +380,7 @@ try to access a list member that does not exist. .B scons -requires Python version 1.5.2 or later. +requires Python version 2.4 or later. There should be no other dependencies or requirements to run .B scons. @@ -591,10 +591,9 @@ Print how many objects are created of the various classes used internally by SCons before and after reading the SConscript files and before and after building targets. -This is not supported when run under Python versions earlier than 2.1, -when SCons is executed with the Python +This is not supported when SCons is executed with the Python .B -O -(optimized) option, +(optimized) option or when the SCons modules have been compiled with optimization (that is, when executing from @@ -642,7 +641,6 @@ Prints a summary of hits and misses using the Memoizer, an internal subsystem that counts how often SCons uses cached values in memory instead of recomputing them each time they're needed. -Only available when using Python 2.2 or later. .TP --debug=memory @@ -658,7 +656,6 @@ A deprecated option preserved for backwards compatibility. --debug=objects Prints a list of the various objects of the various classes used internally by SCons. -This only works when run under Python 2.1 or later. .TP --debug=pdb @@ -2446,13 +2443,6 @@ method (with a few additional capabilities noted below); see the documentation for .B optparse for a thorough discussion of its option-processing capabities. -(Note that although the -.B optparse -module was not a standard module until Python 2.3, -.B scons -contains a compatible version of the module -that is used to provide identical functionality -when run by earlier Python versions.) In addition to the arguments and values supported by the .B optparse.add_option () @@ -5500,7 +5490,7 @@ The default is to use a custom .B SCons.dblite module that uses pickled Python data structures, -and which works on all Python versions from 1.5.2 on. +and which works on all Python versions. Examples: diff --git a/doc/python10/process.xml b/doc/python10/process.xml index 6b049be..4ff0ab1 100644 --- a/doc/python10/process.xml +++ b/doc/python10/process.xml @@ -13,7 +13,7 @@ <listitem> <para> - &SCons; will be written to Python version 1.5.2 (to ensure + &SCons; will be written to Python version 2.4 (to ensure usability by a wide install base). </para> diff --git a/doc/user/build-install.in b/doc/user/build-install.in index d6e4394..0d5d3c7 100644 --- a/doc/user/build-install.in +++ b/doc/user/build-install.in @@ -111,17 +111,6 @@ <para> - (Note that the <option>-V</option> option - was added to Python version 2.0, - so if your system only has an earlier version available - you may see an - <literal>"Unknown option: -V"</literal> - error message.) - - </para> - - <para> - The standard location for information about downloading and installing Python is <ulink url="http://www.python.org/download/">http://www.python.org/download/</ulink>. @@ -132,10 +121,10 @@ <para> - &SCons; will work with any version of Python from 1.5.2 or later. + &SCons; will work with any version of Python from 2.4 or later. If you need to install Python and have a choice, - we recommend using the most recent Python 2.5 version available. - Python 2.5 has significant improvements + we recommend using the most recent Python version available. + Newer Pythons have significant improvements that help speed up the performance of &SCons;. </para> diff --git a/doc/user/build-install.xml b/doc/user/build-install.xml index d6e4394..0d5d3c7 100644 --- a/doc/user/build-install.xml +++ b/doc/user/build-install.xml @@ -111,17 +111,6 @@ <para> - (Note that the <option>-V</option> option - was added to Python version 2.0, - so if your system only has an earlier version available - you may see an - <literal>"Unknown option: -V"</literal> - error message.) - - </para> - - <para> - The standard location for information about downloading and installing Python is <ulink url="http://www.python.org/download/">http://www.python.org/download/</ulink>. @@ -132,10 +121,10 @@ <para> - &SCons; will work with any version of Python from 1.5.2 or later. + &SCons; will work with any version of Python from 2.4 or later. If you need to install Python and have a choice, - we recommend using the most recent Python 2.5 version available. - Python 2.5 has significant improvements + we recommend using the most recent Python version available. + Newer Pythons have significant improvements that help speed up the performance of &SCons;. </para> diff --git a/doc/user/builders-built-in.in b/doc/user/builders-built-in.in index c7516a6..3b5b981 100644 --- a/doc/user/builders-built-in.in +++ b/doc/user/builders-built-in.in @@ -838,19 +838,6 @@ <scons_output_command>scons -Q .</scons_output_command> </scons_output> - <para> - - If you're using Python version 1.5.2 to run &SCons;, - then &SCons; will try to use an external - &zip; program as follows: - - </para> - - <screen> - % <userinput>scons -Q .</userinput> - zip /home/my/project/zip.out file1 file2 - </screen> - </section> </section> diff --git a/doc/user/builders-built-in.xml b/doc/user/builders-built-in.xml index 738683b..b5f3808 100644 --- a/doc/user/builders-built-in.xml +++ b/doc/user/builders-built-in.xml @@ -812,19 +812,6 @@ zip(["out.zip"], ["file1", "file2"]) </screen> - <para> - - If you're using Python version 1.5.2 to run &SCons;, - then &SCons; will try to use an external - &zip; program as follows: - - </para> - - <screen> - % <userinput>scons -Q .</userinput> - zip /home/my/project/zip.out file1 file2 - </screen> - </section> </section> diff --git a/doc/user/misc.in b/doc/user/misc.in index b087606..437d4fe 100644 --- a/doc/user/misc.in +++ b/doc/user/misc.in @@ -36,10 +36,10 @@ <para> Although the &SCons; code itself will run - on any Python version 1.5.2 or later, + on any Python version 2.4 or later, you are perfectly free to make use of Python syntax and modules from more modern versions - (for example, Python 2.4 or 2.5) + (for example, Python 2.5 or 2.6) when writing your &SConscript; files or your own local modules. If you do this, it's usually helpful to diff --git a/doc/user/misc.xml b/doc/user/misc.xml index 7d2bf23..3cd3de7 100644 --- a/doc/user/misc.xml +++ b/doc/user/misc.xml @@ -36,10 +36,10 @@ <para> Although the &SCons; code itself will run - on any Python version 1.5.2 or later, + on any Python version 2.4 or later, you are perfectly free to make use of Python syntax and modules from more modern versions - (for example, Python 2.4 or 2.5) + (for example, Python 2.5 or 2.6) when writing your &SConscript; files or your own local modules. If you do this, it's usually helpful to diff --git a/doc/user/tasks.in b/doc/user/tasks.in index 434871f..bf6b5ee 100644 --- a/doc/user/tasks.in +++ b/doc/user/tasks.in @@ -54,16 +54,6 @@ import os.path filenames = [os.path.join(prefix, x) for x in filenames] </programlisting> -<simpara>or in Python 1.5.2:</simpara> - -<programlisting> -import os.path -new_filenames = [] -for x in filenames: - new_filenames.append(os.path.join(prefix, x)) -</programlisting> -</example> - <example> <title>Substituting a path prefix with another one</title> <programlisting> @@ -71,14 +61,6 @@ if filename.find(old_prefix) == 0: filename = filename.replace(old_prefix, new_prefix) </programlisting> -<simpara>or in Python 1.5.2:</simpara> - -<programlisting> -if filename.find(old_prefix) == 0: - filename = filename.replace(old_prefix, new_prefix) -</programlisting> -</example> - <example> <title>Filtering a filename list to exclude/retain only a specific set of extensions</title> @@ -87,17 +69,6 @@ import os.path filenames = [x for x in filenames if os.path.splitext(x)[1] in extensions] </programlisting> -<simpara>or in Python 1.5.2:</simpara> - -<programlisting> -import os.path -new_filenames = [] -for x in filenames: - if os.path.splitext(x)[1] in extensions: - new_filenames.append(x) -</programlisting> -</example> - <example> <title>The "backtick function": run a shell command and capture the output</title> diff --git a/doc/user/tasks.xml b/doc/user/tasks.xml index 434871f..bf6b5ee 100644 --- a/doc/user/tasks.xml +++ b/doc/user/tasks.xml @@ -54,16 +54,6 @@ import os.path filenames = [os.path.join(prefix, x) for x in filenames] </programlisting> -<simpara>or in Python 1.5.2:</simpara> - -<programlisting> -import os.path -new_filenames = [] -for x in filenames: - new_filenames.append(os.path.join(prefix, x)) -</programlisting> -</example> - <example> <title>Substituting a path prefix with another one</title> <programlisting> @@ -71,14 +61,6 @@ if filename.find(old_prefix) == 0: filename = filename.replace(old_prefix, new_prefix) </programlisting> -<simpara>or in Python 1.5.2:</simpara> - -<programlisting> -if filename.find(old_prefix) == 0: - filename = filename.replace(old_prefix, new_prefix) -</programlisting> -</example> - <example> <title>Filtering a filename list to exclude/retain only a specific set of extensions</title> @@ -87,17 +69,6 @@ import os.path filenames = [x for x in filenames if os.path.splitext(x)[1] in extensions] </programlisting> -<simpara>or in Python 1.5.2:</simpara> - -<programlisting> -import os.path -new_filenames = [] -for x in filenames: - if os.path.splitext(x)[1] in extensions: - new_filenames.append(x) -</programlisting> -</example> - <example> <title>The "backtick function": run a shell command and capture the output</title> |